Commit 93fbceaa authored by Antoine Catton's avatar Antoine Catton

Add configuration reload in apachephp recipe.

Using a graceful restart :
<http://httpd.apache.org/docs/2.2/stopping.html#graceful>
parent e81ff26c
......@@ -26,6 +26,7 @@
##############################################################################
import shutil
import os
import signal
from slapos.recipe.librecipe import GenericBaseRecipe
......@@ -93,4 +94,10 @@ class Recipe(GenericBaseRecipe):
self.substituteTemplate(self.options['template'], mysql_conf))
path_list.append(config)
if os.path.exists(self.options['pid-file']):
# Reload apache configuration
with open(self.options['pid-file']) as pid_file:
pid = int(pid_file.read().strip(), 10)
os.kill(pid, signal.SIGUSR1) # Graceful restart
return path_list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment