mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-01 21:26:24 +00:00
Monotone-Parent: 17e3e8707a2ae061fd0c4184a32cd23a97af96ba
Monotone-Revision: 7371179d3b938cc3b5765e89f460ceb7c9380b83 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-11-07T16:00:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -8,9 +8,10 @@
|
||||
|
||||
# SOGo init script for RedHat
|
||||
#
|
||||
# Copyright (C) 2007 Inverse inc.
|
||||
# Copyright (C) 2007-2008 Inverse inc.
|
||||
#
|
||||
# Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
# Authors: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
# Francis Lachapelle <flachapelle@inverse.ca>
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -74,31 +75,38 @@ fi
|
||||
|
||||
#set -e
|
||||
|
||||
start() {
|
||||
echo $"Starting $DESC: "
|
||||
for ((a=1; a <= PREFORK ; a++))
|
||||
do
|
||||
daemon --user=sogo $DAEMON $a
|
||||
echo "$DAEMON $a"
|
||||
done
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo $"Stopping $DESC: "
|
||||
for ((a=1; a <= PREFORK ; a++))
|
||||
do
|
||||
pid="`cat ${PIDFILE}${a}`"
|
||||
ppid="`ps --ppid ${pid} -o pid=`"
|
||||
kill -9 $pid
|
||||
kill -9 $ppid
|
||||
rm -f ${PIDFILE}${a}
|
||||
echo "$DAEMON $a stopped"
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo $"Starting $DESC: "
|
||||
for ((a=1; a <= PREFORK ; a++))
|
||||
do
|
||||
daemon --user=sogo $DAEMON $a
|
||||
echo "$DAEMON $a"
|
||||
done
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
echo -n $"Stopping $DESC: "
|
||||
killproc $REAL_DAEMON && rm -f ${PIDFILE}*
|
||||
echo
|
||||
stop
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo $"Restarting $DESC: "
|
||||
for ((a=1; a <= PREFORK ; a++))
|
||||
do
|
||||
pid="`cat ${PIDFILE}${a}`"
|
||||
kill $pid
|
||||
rm -f ${PIDFILE}${a}
|
||||
sleep 1
|
||||
daemon --user=sogo $DAEMON $a
|
||||
echo "$DAEMON $a restarted"
|
||||
done
|
||||
stop
|
||||
start
|
||||
;;
|
||||
status)
|
||||
status $REAL_DAEMON
|
||||
|
||||
Reference in New Issue
Block a user