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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
slapos
Commits
d933655b
Commit
d933655b
authored
Jan 04, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced SIGUSR1 with command line; replaced python wrapper with plain sh
parent
ef75d65c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
slapos/recipe/apacheproxy/__init__.py
slapos/recipe/apacheproxy/__init__.py
+17
-12
No files found.
slapos/recipe/apacheproxy/__init__.py
View file @
d933655b
...
...
@@ -24,8 +24,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
os
import
signal
import
subprocess
from
slapos.recipe.librecipe
import
GenericBaseRecipe
...
...
@@ -50,17 +49,23 @@ class Recipe(GenericBaseRecipe):
)
path_list
.
append
(
httpd_conf
)
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'httpd-binary'
],
'-f'
,
self
.
options
[
'httpd-conf'
],
'-DFOREGROUND'
]
)
wrapper
=
self
.
createWrapper
(
name
=
self
.
options
[
'wrapper'
],
command
=
self
.
options
[
'httpd-binary'
],
parameters
=
[
'-f'
,
self
.
options
[
'httpd-conf'
],
'-DFOREGROUND'
,
])
path_list
.
append
(
wrapper
)
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
subprocess
.
call
([
self
.
options
[
'httpd-binary'
],
'-f'
,
self
.
options
[
'httpd-conf'
],
'-k'
,
'graceful'
,
])
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