mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
* debian*/rules: Restart sogod after pkg upgrade (dh_installinit -R)
* Scripts/sogo-init.d-*: add support for conditional restart.
Patch from Romain Le Disez
* sogo.spec: Restart sogod during post installation if it was already running
Monotone-Parent: 7fa995267c41300aff7187361273b7fe03da3809
Monotone-Revision: a7e3713b79d3ec5043152d79550eec23b2ff854f
Monotone-Author: jraby@inverse.ca
Monotone-Date: 2012-05-24T18:09:47
This commit is contained in:
@@ -146,12 +146,17 @@ case "$1" in
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
if status -p "$PIDFILE" $DAEMON >&/dev/null; then
|
||||
restart
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status -p "$PIDFILE" $DAEMON
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|status}" >&2
|
||||
echo "Usage: $N {start|stop|restart|condrestart|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -96,6 +96,11 @@ case "$1" in
|
||||
startproc -u $USER $DAEMON $DAEMON_OPTS || true
|
||||
echo "$NAME."
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
if checkproc -p "$PIDFILE" $DAEMON >&/dev/null; then
|
||||
restart
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
checkproc -p $PIDFILE $DAEMON
|
||||
result="$?"
|
||||
@@ -115,7 +120,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $NAME {start|stop|restart|status}" >&2
|
||||
echo "Usage: $NAME {start|stop|restart|condrestart|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user