File: //etc.defaults/init/synowifid.conf
description "Syno Wifi daemon"
author "Advanced Network Team"
# do not start on anything
stop on runlevel [06]
console log
expect fork
respawn
respawn limit 5 10
pre-start script
/bin/date || true
echo "start synowifid" || true
topology=`/bin/get_key_value /etc/synoinfo.conf net_topology` || true
isEth0Slave=`/bin/get_key_value /etc/sysconfig/network-scripts/ifcfg-eth0 SLAVE` || true
if [ "x${topology}" = "xbridge" -a "x${isEth0Slave}" = "xyes" ]; then
echo "${topology} -> router" || true
/usr/syno/bin/synosetkeyvalue /etc/synoinfo.conf net_topology router || true
fi
end script
script
exec /usr/syno/sbin/synowifid
end script
# vim:ft=upstart