Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joanne Hugé
slapos
Commits
9e1711ab
Commit
9e1711ab
authored
Dec 14, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced 'kill -SIGUSR1' with 'httpd... reload'
parent
9e4b6641
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
slapos/recipe/apachephp/__init__.py
slapos/recipe/apachephp/__init__.py
+16
-8
No files found.
slapos/recipe/apachephp/__init__.py
View file @
9e1711ab
...
@@ -24,13 +24,17 @@
...
@@ -24,13 +24,17 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
##############################################################################
##############################################################################
import
shutil
import
shutil
import
os
import
os
import
signal
import
signal
import
subprocess
from
binascii
import
b2a_uu
as
uuencode
from
binascii
import
b2a_uu
as
uuencode
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
def
install
(
self
):
...
@@ -112,12 +116,16 @@ class Recipe(GenericBaseRecipe):
...
@@ -112,12 +116,16 @@ class Recipe(GenericBaseRecipe):
self
.
substituteTemplate
(
self
.
options
[
'template'
],
application_conf
))
self
.
substituteTemplate
(
self
.
options
[
'template'
],
application_conf
))
path_list
.
append
(
config
)
path_list
.
append
(
config
)
if
os
.
path
.
exists
(
self
.
options
[
'pid-file'
]):
# Reload apache configuration.
# Reload apache configuration
# notez-bien: a graceful restart or a SIGUSR1 can somehow hang the apache threads.
with
open
(
self
.
options
[
'pid-file'
])
as
pid_file
:
pid
=
int
(
pid_file
.
read
().
strip
(),
10
)
subprocess
.
call
([
try
:
self
.
options
[
'httpd-binary'
],
os
.
kill
(
pid
,
signal
.
SIGUSR1
)
# Graceful restart
'-f'
,
except
OSError
:
self
.
options
[
'httpd-conf'
],
pass
'-k'
,
'reload'
])
return
path_list
return
path_list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment