HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //etc/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