1
0
This repository has been archived on 2025-06-16. You can view files and clone it, but cannot push or open issues or pull requests.
Files
openwrt_archive/net/bird/files/bird4loop
Felix Fietkau 50e43593fd bird: adjust for service_* code move
SVN-Revision: 31043
2012-03-20 14:30:21 +00:00

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