HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: //proc/25618/root/lib64/systemd/scripts/s2s_starter.sh
#!/bin/bash

PreStart() {
	env MaxWatches=8192
	env MaxQueueEvents=163840

	SupportS2S=`/bin/get_key_value /etc.defaults/synoinfo.conf support_s2s` || true
	if [ "yes" = "${SupportS2S}" -o "YES" = "${SupportS2S}"  ]; then
		MaxWatches=`/bin/get_key_value /etc.defaults/synoinfo.conf s2s_watches_max` || true

		if [[ -n "$MaxWatches" ]]; then
			echo $MaxWatches > /proc/sys/fs/inotify/max_user_watches || true
			echo $MaxQueueEvents > /proc/sys/fs/inotify/max_queued_events || true
		fi
	else
		exit -1
	fi

	echo "Starting s2s_daemon"
}

PostStop() {
	echo "Stopped s2s_daemon"
}

Execute() {
	/usr/syno/bin/s2s_daemon -d
}

case $1 in
	pre-start)
		PreStart
		;;
	post-stop)
		PostStop
		;;
	execute)
		Execute
		;;
esac

exit 0