20 lines
420 B
Text
20 lines
420 B
Text
|
#!/bin/sh
|
||
|
sv start networking
|
||
|
sv stop systemd-timesyncd
|
||
|
DAEMON=/usr/sbin/ntpd
|
||
|
if [ -r /etc/default/ntp ]; then
|
||
|
. /etc/default/ntp
|
||
|
fi
|
||
|
|
||
|
if [ -e /run/ntp.conf.dhcp ]; then
|
||
|
NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
|
||
|
fi
|
||
|
|
||
|
RUNASUSER=ntp
|
||
|
UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true
|
||
|
|
||
|
if test "$(uname -s)" = "Linux"; then
|
||
|
NTPD_OPTS="$NTPD_OPTS -u $UGID"
|
||
|
fi
|
||
|
exec $DAEMON --nofork $NTP_OPTS
|