CLOUDSTACK-3583: Fix for Management server stop is not removing the PID

This commit is contained in:
Saksham Srivastava 2013-10-11 16:34:49 +05:30 committed by Rajesh Battala
parent c0c46268ac
commit 770bfe4354
1 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,8 @@ stop() {
done
if [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ]; then
log_success_msg "Stopping ${NAME}:"
rm -f /var/run/${NAME}.pid
rm -f /var/lock/subsys/${NAME}
else
log_failure_msg "Stopping ${NAME}:"
fi
@ -77,7 +79,7 @@ set_ulimit() {
}
handle_pid_file() {
if [ "$1" -ne 0 ] ; then
if [ "$1" -ne 0 ] && [ "$1" -ne 3 ]; then
echo "The pid file locates at /var/run/${NAME}.pid and lock file at /var/lock/subsys/${NAME}.
Starting ${NAME} will take care of them or you can manually clean up."
fi