added ntpd
This commit is contained in:
1 parent
1db34c6ec6
commit
87d86330da
4 files changed
+56
-15
No files matched your search
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../../usr/lib/init/services/ntpd.service
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
config timeserver 'ntp'
|
||||||
|
option enabled '1'
|
||||||
|
option enable_server '0' # Set to '1' to enable NTP server functionality
|
||||||
|
list server 'pool.ntp.org'
|
||||||
|
list server 'time.nist.gov'
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- import colors and init-funcs ---
|
||||||
|
. /usr/lib/init/colors.sh
|
||||||
|
. /usr/lib/init/init-funcs.sh
|
||||||
|
#------------------------------------
|
||||||
|
|
||||||
|
NTPD_OPTS=""
|
||||||
|
|
||||||
|
start() {
|
||||||
|
notify "Starting ntpd"
|
||||||
|
/usr/bin/ntpd $NTPD_OPTS
|
||||||
|
check $? "start ntpd"
|
||||||
|
echo $(pgrep ntpd) > /var/run/ntpd.pid
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
notify "Stopping ntpd"
|
||||||
|
kill $(cat /var/run/ntpd.pid)
|
||||||
|
check $? "stop ntpd"
|
||||||
|
rm /var/run/ntpd.pid &> /dev/null
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start|stop|restart|reload|help)
|
||||||
|
"$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
help
|
||||||
|
return 1
|
||||||
|
esac
|
||||||
|
return $?
|
||||||
+16
-15
@@ -4,18 +4,19 @@
|
|||||||
04mdev
|
04mdev
|
||||||
05swap
|
05swap
|
||||||
06networking
|
06networking
|
||||||
07netplugd
|
07ntpd
|
||||||
08sysctl
|
08netplugd
|
||||||
09crond
|
09sysctl
|
||||||
10dnsmasq
|
10crond
|
||||||
11dnsd
|
11dnsmasq
|
||||||
12telnetd
|
12dnsd
|
||||||
13sshd
|
13telnetd
|
||||||
14iptables
|
14sshd
|
||||||
15ftpd
|
15iptables
|
||||||
16hostapd
|
16ftpd
|
||||||
17httpd
|
17hostapd
|
||||||
18nginx
|
18httpd
|
||||||
19openrouterinit
|
19nginx
|
||||||
20dropbear
|
20openrouterinit
|
||||||
21gitea
|
21dropbear
|
||||||
|
22gitea
|
||||||
Reference in new issue
Block a user