NTPSec
This commit is contained in:
parent
c5d95d0e5e
commit
dc0a3257fc
2 changed files with 4 additions and 14 deletions
|
@ -1,20 +1,9 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
DAEMON="/usr/sbin/ntpd"
|
command="/usr/sbin/ntpd"
|
||||||
PIDFILE="/var/run/ntpd.pid"
|
pidfile="/var/run/ntpd.pid"
|
||||||
|
command_args="-g"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
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 $?
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# https://gist.github.com/jauderho/2ad0d441760fc5ed69d8d4e2d6b35f8d
|
# https://gist.github.com/jauderho/2ad0d441760fc5ed69d8d4e2d6b35f8d
|
||||||
server time.cloudflare.com nts iburst
|
server time.cloudflare.com nts iburst
|
||||||
driftfile /var/lib/ntp/ntp.drift
|
driftfile /var/lib/ntp/ntp.drift
|
||||||
|
file pidfile filename /var/run/ntpd.pid type pid
|
||||||
|
|
Loading…
Reference in a new issue