monit: updated to 5.15, fixed mandir location and improved start-script (Thanks to Juergen)

This commit is contained in:
Jose V Beneyto 2016-02-01 10:24:39 +01:00
parent 60107b5c0f
commit 17bb6cc6fb
4 changed files with 37 additions and 26 deletions

View File

@ -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

View File

@ -1,2 +1,2 @@
7902ff45eaa1303ac25f6366eff251ef monit-5.13.tar.gz
912160c1b3f72bc31cb9f91d37ae364d monitd
c723745298d7ba6d28194b9f25eba6fe monit-5.15.tar.gz
2b53a910b186b0c21306f59dc0a48f8c monitd

View File

@ -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

View File

@ -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