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/synotunnel.conf
description "Synology IPv6 tunnel service"
author "Storage Technology Team"
start on syno.network.ready
stop on runlevel [06]
console log

pre-start script
	if [ "`get_key_value /etc.defaults/synoinfo.conf ipv4only`" = "yes" ]; then
		stop; exit 0
	fi

	if [ -x /etc/gogoc/rc.tun ] && [ -x /usr/syno/bin/synotunnelexec ]; then
		# When booting we don't want to block and delay ready-time of DSM if we
		# failed to do successful connection. Therefore we put the script
		# running in backgorund.  However, when we are called from UI, we can't
		# just pretend all is well when the connection is failed, or UI won't
		# show the error messages.
		if /usr/syno/bin/synobootseq --is-booting-up &> /dev/null; then
			/usr/syno/bin/synotunnelexec start &
		else
			/usr/syno/bin/synotunnelexec start
		fi
	fi
end script

post-stop script
	if [ -x /etc/gogoc/rc.tun ]; then
		if [ -x /usr/syno/bin/synotunnelexec ]; then
			/usr/syno/bin/synotunnelexec stop
		fi
	fi
end script