routing/bird/files/bird6loop
Jo-Philipp Wich 1cccda8588 bird: Update to 1.3.11 and fix build issues
Based on patch by Álvaro Fernández Rojas <noltari@gmail.com>

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2013-10-08 19:30:45 +00:00

24 lines
364 B
Bash

#!/bin/sh
BIRD="/usr/sbin/bird6 -c /etc/bird6.conf"
$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