blob: 6215acc4aa217ddbc0099ad30d8e97eae5536ce4 [file] [log] [blame]
Peter Korsgaardd016a6a2014-08-12 18:02:46 +02001#!/bin/sh
2#
3# Start chrony
4
5[ -f /etc/chrony.conf ] || exit 0
6
7case "$1" in
8 start)
Maxime Hadjinlian0f75b262015-10-03 23:29:57 +02009 printf "Starting chrony: "
Peter Korsgaardd016a6a2014-08-12 18:02:46 +020010 chronyd && echo "OK" || echo "FAIL"
11 ;;
12 stop)
Maxime Hadjinlian0f75b262015-10-03 23:29:57 +020013 printf "Stopping chrony: "
Peter Korsgaardd016a6a2014-08-12 18:02:46 +020014 killall chronyd && echo "OK" || echo "FAIL"
15 ;;
16 restart|reload)
17 "$0" stop
18 sleep 1
19 "$0" start
20 ;;
21 *)
22 echo "Usage: $0 {start|stop|restart}"
23 exit 1
24esac
25
26exit $?