summaryrefslogtreecommitdiff
path: root/chrony
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2015-04-07 17:20:36 +0200
committerJuergen Daubert <jue@jue.li>2015-04-07 17:20:36 +0200
commit5b70f814a45225e162fe7e9dc14cca11ebbeeb1d (patch)
tree97d8e8a242eb7d4fbad263958a18705c0542443e /chrony
parent45e139b36ad55e30b490783b1487546fe1a91540 (diff)
downloadopt-5b70f814a45225e162fe7e9dc14cca11ebbeeb1d.tar.gz
opt-5b70f814a45225e162fe7e9dc14cca11ebbeeb1d.tar.xz
[notify] chrony: update to 1.31.1, improved rc script
Security fixes, see http://chrony.tuxfamily.org/News.html
Diffstat (limited to 'chrony')
-rw-r--r--chrony/.md5sum4
-rw-r--r--chrony/Pkgfile4
-rw-r--r--chrony/chronyd25
3 files changed, 23 insertions, 10 deletions
diff --git a/chrony/.md5sum b/chrony/.md5sum
index 2d2a844b0..61c091855 100644
--- a/chrony/.md5sum
+++ b/chrony/.md5sum
@@ -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
diff --git a/chrony/Pkgfile b/chrony/Pkgfile
index be0c1753f..48b5003f7 100644
--- a/chrony/Pkgfile
+++ b/chrony/Pkgfile
@@ -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)
diff --git a/chrony/chronyd b/chrony/chronyd
index 53f1e9e86..e4d8a5300 100644
--- a/chrony/chronyd
+++ b/chrony/chronyd
@@ -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

Generated by cgit