commit 17bb6cc6fbb0792640a2b2635c237c3ea345fee1 Author: Jose V Beneyto <sepen@crux.nu> Date: Mon Feb 1 10:24:39 2016 +0100 monit: updated to 5.15, fixed mandir location and improved start-script (Thanks to Juergen) diff --git a/monit/.footprint b/monit/.footprint index 2d9ea62..09bbb37 100644 --- a/monit/.footprint +++ b/monit/.footprint @@ -5,6 +5,7 @@ drwxr-xr-x root/root etc/rc.d/ drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/monit -drwxr-xr-x root/root usr/man/ -drwxr-xr-x root/root usr/man/man1/ --rw-r--r-- root/root usr/man/man1/monit.1.gz +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/monit.1.gz diff --git a/monit/.md5sum b/monit/.md5sum index e2ab4db..a53b22a 100644 --- a/monit/.md5sum +++ b/monit/.md5sum @@ -1,2 +1,2 @@ -7902ff45eaa1303ac25f6366eff251ef monit-5.13.tar.gz -912160c1b3f72bc31cb9f91d37ae364d monitd +c723745298d7ba6d28194b9f25eba6fe monit-5.15.tar.gz +2b53a910b186b0c21306f59dc0a48f8c monitd diff --git a/monit/Pkgfile b/monit/Pkgfile index 338e103..fd4628b 100644 --- a/monit/Pkgfile +++ b/monit/Pkgfile @@ -5,7 +5,7 @@ # Depends on: openssl name=monit -version=5.13 +version=5.15 release=1 source=(http://mmonit.com/$name/dist/$name-$version.tar.gz \ monitd) @@ -14,7 +14,6 @@ build() { cd $name-$version ./configure --prefix=/usr \ - --mandir=/usr/man \ --sysconfdir=/etc \ --without-pam diff --git a/monit/monitd b/monit/monitd index ec190de..a3700ff 100644 --- a/monit/monitd +++ b/monit/monitd @@ -3,26 +3,37 @@ # /etc/rc.d/monitd: start/stop monit daemon # -CONFIG=/etc/monitrc +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/monit +PID=/var/run/monit.pid +OPTS="-c /etc/monitrc -p $PID" case $1 in - start) - /usr/bin/monit -c $CONFIG - ;; - stop) - /usr/bin/killall -q /usr/bin/monit - ;; - reload) - /usr/bin/monit -c $CONFIG reload - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 [start|stop|reload|restart]" - ;; +start) + $SSD --start --pidfile $PID --exec $PROG -- $OPTS + ;; +stop) + $SSD --stop --retry 10 --pidfile $PID + ;; +restart) + $0 stop + $0 start + ;; +reload) + $PROG $OPTS reload + ;; +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|reload|status]" + ;; esac -# End of File +# End of file