Make ./clean.sh work in more situations
When transitioning between different wsgi modes, or service modes, we
should really safely stop and cleanup things that are started in any
service mode, which makes it easier to ensure that we don't leave
things around from past runs.
Change-Id: I33acbee39e1a2da2bfd79a5dd54b84a12a778be1
diff --git a/functions-common b/functions-common
index 65c38a5..90f5400 100644
--- a/functions-common
+++ b/functions-common
@@ -1679,15 +1679,12 @@
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
if is_service_enabled $service; then
- # Kill via pid if we have one available
- if [[ "$USE_SYSTEMD" == "True" ]]; then
- # Only do this for units which appear enabled, this also
- # catches units that don't really exist for cases like
- # keystone without a failure.
- if $SYSTEMCTL is-enabled devstack@$service.service; then
- $SYSTEMCTL stop devstack@$service.service
- $SYSTEMCTL disable devstack@$service.service
- fi
+ # Only do this for units which appear enabled, this also
+ # catches units that don't really exist for cases like
+ # keystone without a failure.
+ if $SYSTEMCTL is-enabled devstack@$service.service; then
+ $SYSTEMCTL stop devstack@$service.service
+ $SYSTEMCTL disable devstack@$service.service
fi
if [[ -r $SERVICE_DIR/$SCREEN_NAME/$service.pid ]]; then