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.defaults/init/synoovs-vswitch.conf
description "OpenvSwitch virtual switch daemon"

author "Advanced Network Team"

start on started synoovs-db

console log
expect fork
respawn
respawn limit 5 10
limit nofile 65536 65536

pre-start script
	/usr/bin/ovs-vsctl --no-wait init || true
	echo `/bin/date` "start openvswitch-vswitchd"
end script

exec /usr/sbin/ovs-vswitchd --pidfile --detach -vbond:file:warn

post-start script
	threads=`ps -C ovs-vswitchd --no-headers | wc -l`
	retry=0
	while [ $threads -gt 1 -a $retry -lt 10 ]
	do
		echo "wait for parent to exit"
		retry=$(($retry+1))
		sleep 1
		threads=`ps -C ovs-vswitchd --no-headers | wc -l`
	done
	echo `/bin/date` "start openvswitch-vswitchd complete"
end script

pre-stop script
	if /usr/syno/bin/synobootseq --is-safe-shutdown &>/dev/null; then
		start; exit 0
	fi
	echo `/bin/date` "stop openvswitch-vswitchd "
end script
# vim:ft=upstart