[notify] chrony: update to 1.31.1, improved rc script
Security fixes, see http://chrony.tuxfamily.org/News.html
This commit is contained in:
parent
45e139b36a
commit
5b70f814a4
@ -1,4 +1,4 @@
|
||||
04ab702fc81150db06809562a9aaed92 chrony-1.31.tar.gz
|
||||
01e54c63d09a310f30c4e399f18499df chrony-1.31.1.tar.gz
|
||||
4dff89484fe7b6d6397a9501c7ae51ed chrony.conf
|
||||
ec43dcf700698a7d2891a1f8504b5e22 chrony.keys
|
||||
ef4b4ca7c250397656d81a329faf60d2 chronyd
|
||||
2999f364c83286816d71379130d1eae6 chronyd
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Description: Network time protocol client/server
|
||||
# URL: http://chrony.tuxfamily.org/
|
||||
# Maintainer: Juergen Daubert, jue at crux dot nu
|
||||
# Depends on: ncurses readline libcap
|
||||
# Depends on: readline libcap
|
||||
|
||||
name=chrony
|
||||
version=1.31
|
||||
version=1.31.1
|
||||
release=1
|
||||
source=(http://download.tuxfamily.org/$name/$name-$version.tar.gz
|
||||
chronyd chrony.conf chrony.keys)
|
||||
|
@ -3,19 +3,23 @@
|
||||
# /etc/rc.d/chronyd: start/stop the chrony time server
|
||||
#
|
||||
|
||||
KEY=`sed -n "s/^commandkey *//p" /etc/chrony.conf`
|
||||
PASSWD=`sed -n "s/^$KEY *//p" /etc/chrony.keys`
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/chronyd
|
||||
PID=/var/run/chronyd.pid
|
||||
OPTS="-s -r"
|
||||
|
||||
KEY=$(sed -n "s/^commandkey *//p" /etc/chrony.conf)
|
||||
PASSWD=$(sed -n "s/^$KEY *//p" /etc/chrony.keys)
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
/usr/sbin/chronyd -s -r
|
||||
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
killall -q /usr/sbin/chronyd
|
||||
$SSD --stop --retry 10 --pidfile $PID
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 2
|
||||
$0 start
|
||||
;;
|
||||
online)
|
||||
@ -32,8 +36,17 @@ offline)
|
||||
writertc
|
||||
EOF
|
||||
;;
|
||||
status)
|
||||
$SSD --status --pidfile $PID
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(cat $PID)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|online|offline]"
|
||||
echo "usage: $0 [start|stop|restart|online|offline|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user