aboutsummaryrefslogtreecommitdiff
path: root/package/chrony/S49chrony
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2014-08-12 18:02:46 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-08-12 18:02:46 +0200
commitd016a6a30dd86f5d6a02663fa4729a75e48ae379 (patch)
tree5050d17218f693da847c0cae1accd4d653297e22 /package/chrony/S49chrony
parent2c881c4b1aa5c96dd14e314ec685356f89f45483 (diff)
downloadbuildroot-d016a6a30dd86f5d6a02663fa4729a75e48ae379.tar.gz
buildroot-d016a6a30dd86f5d6a02663fa4729a75e48ae379.tar.bz2
chrony: add sysv initscript
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/chrony/S49chrony')
-rwxr-xr-xpackage/chrony/S49chrony26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/chrony/S49chrony b/package/chrony/S49chrony
new file mode 100755
index 0000000000..66a50d59c0
--- /dev/null
+++ b/package/chrony/S49chrony
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Start chrony
+
+[ -f /etc/chrony.conf ] || exit 0
+
+case "$1" in
+ start)
+ echo "Starting chrony: "
+ chronyd && echo "OK" || echo "FAIL"
+ ;;
+ stop)
+ echo -n "Stopping chrony: "
+ killall chronyd && echo "OK" || echo "FAIL"
+ ;;
+ restart|reload)
+ "$0" stop
+ sleep 1
+ "$0" start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?