0b85eb9822
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31043 3c298f89-4303-0410-b956-a3cf2f4a3e73
25 lines
343 B
Bash
25 lines
343 B
Bash
#!/bin/sh
|
|
|
|
BIRD=/usr/sbin/bird4
|
|
|
|
$BIRD -p || return 1
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/service.sh
|
|
|
|
SERVICE_DAEMONIZE=1
|
|
SERVICE_WRITE_PID=1
|
|
|
|
sig_handler() {
|
|
running=0
|
|
service_stop $BIRD
|
|
}
|
|
|
|
running=1
|
|
trap sig_handler INT
|
|
trap sig_handler TERM
|
|
while [ $running -gt 0 ]; do
|
|
service_check $BIRD || service_start $BIRD -d "$@"
|
|
sleep 3
|
|
done
|