core/networkmanager-dispatcher-ntpd/10-ntpd

27 lines
603 B
Plaintext
Raw Normal View History

2011-07-21 19:16:22 +08:00
#!/bin/bash
if [ -e /sys/fs/cgroup/systemd ]; then
case "$2" in
up)
2014-08-19 04:48:26 +08:00
systemctl start ntpd.service
;;
down)
2014-08-19 04:48:26 +08:00
systemctl stop ntpd.service
;;
esac
2014-08-19 04:48:26 +08:00
else
if [ -e "/etc/rc.d/ntpd" ]; then
case "$2" in
up)
rc.d start ntpd
;;
down)
rc.d stop ntpd
;;
esac
fi
fi