From a5162ad6d7b15b47fe7fec51bb4f2dfa024a1cc3 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 29 Jan 2019 16:30:36 -0600 Subject: [PATCH] Keystone: remove stale pids on startup if present This PS removes stale pids on startup if present. Change-Id: Iff136f16f8d15a08e8ce8c51d058b55288f97a2e Signed-off-by: Pete Birley --- keystone/templates/bin/_keystone-api.sh.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/keystone/templates/bin/_keystone-api.sh.tpl b/keystone/templates/bin/_keystone-api.sh.tpl index 217d9422d2..2f127b94cb 100644 --- a/keystone/templates/bin/_keystone-api.sh.tpl +++ b/keystone/templates/bin/_keystone-api.sh.tpl @@ -31,6 +31,11 @@ function start () { source /etc/apache2/envvars fi + if [ -f /var/run/apache2/apache2.pid ]; then + # Remove the stale pid for debian/ubuntu images + rm -f /var/run/apache2/apache2.pid + fi + # Start Apache2 exec apache2 -DFOREGROUND }