From: Andy Witter Date: Fri, 12 Jan 2018 21:20:33 +0000 (-0500) Subject: force kill apache2 to install nginx X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3a3834a231ba504c988c772a24f616ec46ae0cdf;p=contrib%2Fpines%2Fgenasys.git force kill apache2 to install nginx --- diff --git a/templates/setup-head.sh b/templates/setup-head.sh index dc9658b..b59d38b 100755 --- a/templates/setup-head.sh +++ b/templates/setup-head.sh @@ -202,7 +202,16 @@ sed -i 's/APACHE_RUN_USER=www-data/APACHE_RUN_USER=opensrf/g' /etc/apache2/envva ### shutdown apache2 echo;echo "Stopping apache2 to setup nginx...";sleep 3 systemctl stop apache2 - +# Make sure apache2 is dead just in case. +echo;echo killing apache2 processes just in case... +sleep 3 +ps -ef | grep apache2 | grep -v grep | awk '{print $2}' | xargs kill +if ps -ef | grep apache2 +then + echo;echo + echo "apache2 processes are still running please kill them manually" + read -p "Press [Enter] to continue after you have killed the processes" ENTER +fi ### Install nginx $APT_TOOL install -y nginx