1 #!/bin/sh /etc/rc.common
5 CONF=/var/etc/olsrd.conf
6 DEFAULT=/etc/default/olsrd
11 [ -f $DEFAULT ] && . $DEFAULT
15 lua /lib/config/olsr.lua > $CONF
17 ### check for running instance (start-stop-daemon is too stupid to do this)
19 if kill -0 $(cat $PID) 2>&-; then
20 echo "there is already a running instance ($(cat $PID))"
26 start-stop-daemon -b -m -p $PID -x $BIN -S -- -f $CONF -nofork $OPTIONS
31 start-stop-daemon -q -p $PID -a ${BIN##*/} -K
35 ### override generic restart because we need some time between stop and start