#!/bin/bash

# trap signal                                        

pidfile=/var/run/warnning.pid

[ -e $pidfile ] && exit 1
echo $$ > $pidfile

stopping=0
service_stop(){
        stopping=1
        rm -f $pidfile
}

trap 'service_stop' SIGSEGV SIGTERM SIGINT SIGSTOP SIGHUP SIGQUIT SIGKILL

while [ 1 ]
do
	[ $stopping -eq 1 ] && break
	/usr/bin/buzzer all 1 6
	sleep 1
done
