S49chrony 390 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. #
  3. # Start chrony
  4. [ -r /etc/default/chrony ] && . /etc/default/chrony
  5. case "$1" in
  6. start)
  7. printf "Starting chrony: "
  8. chronyd $CHRONY_ARGS && echo "OK" || echo "FAIL"
  9. ;;
  10. stop)
  11. printf "Stopping chrony: "
  12. killall chronyd && echo "OK" || echo "FAIL"
  13. ;;
  14. restart|reload)
  15. "$0" stop
  16. sleep 1
  17. "$0" start
  18. ;;
  19. *)
  20. echo "Usage: $0 {start|stop|restart}"
  21. exit 1
  22. esac
  23. exit $?