Bug 11357 - cloud-management dead but pid file exists

flesh out details information when PID file still existing while management server already died

status 11357: resolved fixed
This commit is contained in:
frank 2012-01-12 13:53:07 -08:00
parent 5d54a3aef8
commit 478dc04108
3 changed files with 32 additions and 7 deletions

View File

@ -60,11 +60,19 @@ set_ulimit() {
fi
}
handle_pid_file() {
if [ "$1" -ne 0 ] ; then
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
Starting cloud-management will take care of them or you can manually clean up."
fi
}
# See how we were called.
case "$1" in
status)
status ${NAME}
RETVAL=$?
handle_pid_file $RETVAL
;;
stop)
stop

View File

@ -59,11 +59,19 @@ stop() {
fi
}
handle_pid_file() {
if [ "$1" -ne 0 ] ; then
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
Starting cloud-management will take care of them or you can manually clean up."
fi
}
# See how we were called.
case "$1" in
status)
status ${NAME}
RETVAL=$?
handle_pid_file $RETVAL
;;
stop)
stop

View File

@ -60,18 +60,27 @@ set_ulimit() {
fi
}
handle_pid_file() {
if [ "$1" -ne 0 ] ; then
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
Starting cloud-management will take care of them or you can manually clean up."
fi
}
# See how we were called.
case "$1" in
status)
status ${NAME}
RETVAL=$?
;;
status ${NAME}
RETVAL=$?
handle_pid_file $RETVAL
;;
stop)
stop
;;
stop
;;
restart)
stop
set start
stop
set start
set_ulimit
. /etc/rc.d/init.d/tomcat6
;;