blob: a5561a9d13db15209e88b7c010e3527e3fe58891 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
ALARM_SENTINEL_FILE=$HOME/.alarming
main()
{
if [ $# = 0 ]
then
alarm_on 3 'alarming' &
elif [ "$1" = off ]
then
alarm_off
else
usage
fi
}
alarm_off()
{
rm -f "$ALARM_SENTINEL_FILE"
}
alarm_on()
{
touch "$ALARM_SENTINEL_FILE"
while [ -e "$ALARM_SENTINEL_FILE" ]
do
dracos-alarm "$@"
sleep 1
done
}
main "$@"
|