Skip to content

Commit 770bfe4

Browse files
Sakshamsrajesh-battala
authored andcommitted
CLOUDSTACK-3583: Fix for Management server stop is not removing the PID
1 parent c0c4626 commit 770bfe4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packaging/centos63/cloud-management.rc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ stop() {
5757
done
5858
if [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ]; then
5959
log_success_msg "Stopping ${NAME}:"
60+
rm -f /var/run/${NAME}.pid
61+
rm -f /var/lock/subsys/${NAME}
6062
else
6163
log_failure_msg "Stopping ${NAME}:"
6264
fi
@@ -77,7 +79,7 @@ set_ulimit() {
7779
}
7880

7981
handle_pid_file() {
80-
if [ "$1" -ne 0 ] ; then
82+
if [ "$1" -ne 0 ] && [ "$1" -ne 3 ]; then
8183
echo "The pid file locates at /var/run/${NAME}.pid and lock file at /var/lock/subsys/${NAME}.
8284
Starting ${NAME} will take care of them or you can manually clean up."
8385
fi

0 commit comments

Comments
 (0)