* 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:
Jean Raby
2012-05-24 18:09:47 +00:00
parent 9bd903e945
commit 6aed6c5ed0
6 changed files with 23 additions and 4 deletions
+6 -1
View File
@@ -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
+6 -1
View File
@@ -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