chrony: add sysv initscript
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
2c881c4b1a
commit
d016a6a30d
26
package/chrony/S49chrony
Executable file
26
package/chrony/S49chrony
Executable file
@ -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 $?
|
@ -39,4 +39,8 @@ define CHRONY_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
||||
endef
|
||||
|
||||
define CHRONY_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
Loading…
Reference in New Issue
Block a user