1
0
mirror of https://github.com/php/systems.git synced 2026-03-24 15:52:22 +01:00
Files
archived-systems/update-time
2023-10-18 10:19:46 +01:00

14 lines
302 B
Bash
Executable File

#!/bin/sh
#
# sync system time using the NTP pool.
. /etc/profile
. /local/systems/boxen/`hostname`
NTP_PARAMS=-s
NTP_SERVER=${CONTINENT}.pool.ntp.org
# try ntp using source port 123, and if that fails try an unprivileged port
#
ntpdate $NTP_PARAMS $NTP_SERVER || ntpdate $NTP_PARAMS -u $NTP_SERVER