Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
d04451b0
Commit
d04451b0
authored
Nov 16, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add post_rotate script on stunnel
parent
c7fd0874
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
slapos/recipe/stunnel/__init__.py
slapos/recipe/stunnel/__init__.py
+13
-0
No files found.
slapos/recipe/stunnel/__init__.py
View file @
d04451b0
...
...
@@ -29,6 +29,14 @@ import signal
from
slapos.recipe.librecipe
import
GenericBaseRecipe
def
post_rotate
(
args
):
pid_file
=
args
[
'pid_file'
]
if
os
.
path
.
exist
(
pid_file
):
with
open
(
pid_file
,
'r'
)
as
file_
:
pid
=
file_
.
read
().
strip
()
os
.
kill
(
pid
,
signal
.
SIGUSR1
)
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
...
...
@@ -80,4 +88,9 @@ class Recipe(GenericBaseRecipe):
# Reload configuration
os
.
kill
(
int
(
pid
,
10
),
signal
.
SIGHUP
)
if
'post-rotate-script'
in
self
.
options
:
self
.
createPythonScript
(
self
.
options
[
'post-rotate-script'
],
__name__
+
'post_rotate'
,
dict
(
pid_file
=
pid_file
))
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