mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 23:47:21 +08:00
27 lines
603 B
Bash
Executable File
27 lines
603 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
if [ -e /sys/fs/cgroup/systemd ]; then
|
|
case "$2" in
|
|
up)
|
|
systemctl start ntpd.service
|
|
;;
|
|
down)
|
|
systemctl stop ntpd.service
|
|
;;
|
|
esac
|
|
else
|
|
if [ -e "/etc/rc.d/ntpd" ]; then
|
|
case "$2" in
|
|
up)
|
|
rc.d start ntpd
|
|
;;
|
|
down)
|
|
rc.d stop ntpd
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
fi
|
|
|