1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008-2013 OpenWrt.org
4 .
$IPKG_INSTROOT/lib
/functions
/olsrd.sh
10 CONF
=/var
/etc
/$OLSRD.conf
11 PID
=/var
/run
/olsrd6.pid
15 olsrd_generate_config
$OLSRD
18 procd_set_param
command "$BIN"
19 procd_append_param
command -f ${CONF}
20 procd_append_param
command -nofork
21 procd_append_param
command -pidfile ${PID}
23 # restart if olsrd dies
24 procd_set_param respawn
26 # automatically restart olsrd if generated cfg has changed
27 procd_set_param
file $CONF
29 procd_set_param pidfile
$PID
33 olsrd_setup_smartgw_rules
37 # restart on ifup interface events
38 for n
in $
(olsrd_list_configured_interfaces
$OLSRD); do
39 procd_add_reload_interface_trigger
$n /etc
/init.d
/$OLSRD reload