HEX
Server: Apache/2.4.67 (Debian)
System: Linux hosting103 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User: muzikaecom (1013)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/thread-self/root/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