Commit 171c364d authored by Daryl Herzmann's avatar Daryl Herzmann Committed by akrherz

OF-753 improve redhat init script logic with PID file

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13985 b35dd754-fafc-0310-a699-88a17e54d16e
parent b5f4139e
......@@ -133,6 +133,10 @@ start() {
[ $RETVAL -eq 0 -a -d /var/lock/subsys ] && touch /var/lock/subsys/openfire
sleep 1 # allows prompt to return
PID=$(findPID)
echo $PID > $OPENFIRE_PIDFILE
cd $OLD_PWD
}
......@@ -140,18 +144,16 @@ stop() {
# Stop daemons.
echo -n "Shutting down openfire: "
PID=$(findPID)
if [ -n "$PID" ]; then
if [ -n "$FUNCTIONS_FOUND" ]; then
echo $PID > $OPENFIRE_PIDFILE
# delay copied from restart
killproc -p $OPENFIRE_PIDFILE -d 10
rm -f $OPENFIRE_PIDFILE
else
if [ -f "$OPENFIRE_PIDFILE" ]; then
killproc -p $OPENFIRE_PIDFILE -d 10
rm -f $OPENFIRE_PIDFILE
else
PID=$(findPID)
if [ -n $PID ]; then
kill $PID
else
echo "Openfire is not running."
fi
else
echo "Openfire is not running."
fi
RETVAL=$?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment