labs: fix apache2 restart race

"sudo service apache2 restart" sometimes fails because apache is trying
to grab a resource that another process is still holding onto.

Stopping apache first and starting it afterwards seems to avoid that race.

Change-Id: I55bfa125246fbf960b100682a3f4698f8c1d7e09
This commit is contained in:
Roger Luethi 2015-03-29 14:24:30 +02:00
parent 0a86fa84e0
commit 4807c9b342
2 changed files with 4 additions and 2 deletions

@ -37,5 +37,6 @@ echo "Checking dashboard configuration."
check_dashboard_settings
echo "Reloading apache and memcached service."
sudo service apache2 restart
sudo service apache2 stop
sudo service apache2 start
sudo service memcached restart

@ -54,5 +54,6 @@ echo "Checking dashboard configuration."
check_dashboard_settings
echo "Reloading apache and memcached service."
sudo service apache2 restart
sudo service apache2 stop
sudo service apache2 start
sudo service memcached restart