added ntpd

This commit is contained in:
wt
2025-07-25 17:27:40 +07:00
parent 1db34c6ec6
commit 87d86330da
4 changed files with 56 additions and 15 deletions
+34
View File
@@ -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
View File
@@ -4,18 +4,19 @@
04mdev
05swap
06networking
07netplugd
08sysctl
09crond
10dnsmasq
11dnsd
12telnetd
13sshd
14iptables
15ftpd
16hostapd
17httpd
18nginx
19openrouterinit
20dropbear
21gitea
07ntpd
08netplugd
09sysctl
10crond
11dnsmasq
12dnsd
13telnetd
14sshd
15iptables
16ftpd
17hostapd
18httpd
19nginx
20openrouterinit
21dropbear
22gitea