add mass restart support to kojivmd
This commit is contained in:
parent
508b739120
commit
482531dcd3
3 changed files with 24 additions and 3 deletions
|
|
@ -54,6 +54,17 @@ restart() {
|
|||
start
|
||||
}
|
||||
|
||||
graceful() {
|
||||
#SIGUSR1 initiates a graceful restart
|
||||
pid=$(pidofproc kojivmd)
|
||||
if test -z "$pid"
|
||||
then
|
||||
echo $"$prog not running"
|
||||
else
|
||||
kill -10 $pid
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
|
|
@ -71,8 +82,11 @@ case "$1" in
|
|||
condrestart|try-restart)
|
||||
[ -f /var/lock/subsys/kojivmd ] && restart || :
|
||||
;;
|
||||
graceful)
|
||||
graceful
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|graceful}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue