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
Léo-Paul Géneau
slapos
Commits
4b5f2a7f
Commit
4b5f2a7f
authored
Jul 24, 2013
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davstorage: Changed postfix service to python script
parent
255c0a3b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
software/davstorage/common.cfg
software/davstorage/common.cfg
+2
-2
software/davstorage/instance-davstorage.cfg
software/davstorage/instance-davstorage.cfg
+3
-1
software/davstorage/templates/postfix.in
software/davstorage/templates/postfix.in
+16
-2
No files found.
software/davstorage/common.cfg
View file @
4b5f2a7f
...
@@ -85,7 +85,7 @@ mode = 0644
...
@@ -85,7 +85,7 @@ mode = 0644
[instance-davstorage]
[instance-davstorage]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-davstorage.cfg
url = ${:_profile_base_location_}/instance-davstorage.cfg
md5sum =
7f3be7bf2b4de1624b990846c5712c44
md5sum =
26ff128c6d5b999596002ef1d97ad8fb
output = ${buildout:directory}/template-davstorage.cfg
output = ${buildout:directory}/template-davstorage.cfg
mode = 0644
mode = 0644
...
@@ -120,7 +120,7 @@ url = ${:_profile_base_location_}/templates/${:filename}
...
@@ -120,7 +120,7 @@ url = ${:_profile_base_location_}/templates/${:filename}
filename = postfix.in
filename = postfix.in
download-only = true
download-only = true
mode = 0755
mode = 0755
md5sum = 9
4799688bf95fb16b86972a23df13af
2
md5sum = 9
f136d6c217f26e06f7437ceeb7b0c4
2
[sendmail-script-template]
[sendmail-script-template]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
...
...
software/davstorage/instance-davstorage.cfg
View file @
4b5f2a7f
...
@@ -231,11 +231,13 @@ md5sum = f681c0a0a17f4b2a0896b952e53239ed
...
@@ -231,11 +231,13 @@ md5sum = f681c0a0a17f4b2a0896b952e53239ed
[postfix-service]
[postfix-service]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${postfix-service-template:location}/${postfix-service-template:filename}
url = ${postfix-service-template:location}/${postfix-service-template:filename}
python-location = ${python2.7:executable}
postfix-location = ${postfix:location}/usr/sbin/postfix
postfix-location = ${postfix:location}/usr/sbin/postfix
postfix-config-dir = $${directory:postfix-conf}
postfix-config-dir = $${directory:postfix-conf}
pid-location = $${directory:pid}/master.pid
output = $${basedirectory:services}/postfix
output = $${basedirectory:services}/postfix
mode = 0755
mode = 0755
md5sum = 9
4799688bf95fb16b86972a23df13af
2
md5sum = 9
f136d6c217f26e06f7437ceeb7b0c4
2
[sendmail-script]
[sendmail-script]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
...
...
software/davstorage/templates/postfix.in
View file @
4b5f2a7f
#!/bin/sh
#!${:python-location}
${
:postfix-location
}
-c
${
:postfix-config-dir
}
start
import subprocess
\ No newline at end of file
import signal
import time
def handler(signum,frame):
pid_file = open("${:pid-location}","r")
pid = pid_file.read().strip()
subprocess.call(["kill", "-9", pid])
subprocess.call(["${:postfix-location}", "-c", "${:postfix-config-dir}", "start"])
signal.signal(signal.SIGINT,handler)
while True:
time.sleep(120)
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