HEX
Server: nginx/1.29.3
System: Linux mail.sarafai.ru 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: root (0)
PHP: 7.4.33
Disabled: dl,exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: //usr/sbin/ntpdate-debian
#!/bin/sh

set -e

# shellcheck disable=SC2154
if [ -n "$METHOD" ] && [ "$service" != "ntpsec" ]; then
	# Do nothing if called from /etc/network/if-up.d/ntpdate, which is the
	# hook from the ntpdate package (as opposed to ntpsec-ntpdate).
	exit 0
fi

if [ -r /etc/default/ntpsec-ntpdate ]; then
	. /etc/default/ntpsec-ntpdate
fi

if [ "$NTPDATE_USE_NTP_CONF" = yes ]; then
	if [ -r /etc/ntpsec/ntp.conf ]; then
		NTPSERVERS=$(sed -rne 's/^(servers?|peer|pool)[[:space:]]+(-[46][[:space:]]+)?([-_.:[:alnum:]]+).*$/\3/p' /etc/ntpsec/ntp.conf | grep -v '^127\.127\.') || [ $? -le 1 ]
	fi
fi

if [ "$IGNORE_DHCP" != "yes" ] && [ -r /run/ntpsec/ntpdate.dhcp ]; then
	. /run/ntpsec/ntpdate.dhcp
fi

# shellcheck disable=SC2086
exec /usr/sbin/ntpdate $NTPOPTIONS "$@" $NTPSERVERS