This commit is contained in:
f 2022-09-26 16:04:32 -03:00
parent c5d95d0e5e
commit dc0a3257fc
2 changed files with 4 additions and 14 deletions

View file

@ -1,20 +1,9 @@
#!/sbin/openrc-run
DAEMON="/usr/sbin/ntpd"
PIDFILE="/var/run/ntpd.pid"
command="/usr/sbin/ntpd"
pidfile="/var/run/ntpd.pid"
command_args="-g"
depend() {
need net
}
start() {
ebegin "Starting NTPSec"
start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- -g
eend $?
}
stop() {
ebegin "Stopping NTPSec"
start-stop-daemon --stop --pidfile "${PIDFILE}"
eend $?
}

View file

@ -1,3 +1,4 @@
# https://gist.github.com/jauderho/2ad0d441760fc5ed69d8d4e2d6b35f8d
server time.cloudflare.com nts iburst
driftfile /var/lib/ntp/ntp.drift
file pidfile filename /var/run/ntpd.pid type pid