1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- maddy.initd
+++ maddy
@@ -9,6 +9,7 @@
command=/usr/bin/maddy
command_args="$maddy_opts"
command_user=maddy:maddy
+retry=SIGTERM/5
# make relative paths in config relative to the state directory
directory="/var/lib/$RC_SVCNAME"
@@ -32,5 +33,11 @@
}
start_pre() {
+ rm -rf /run/maddy
checkpath -d -o maddy:maddy /run/maddy
}
+
+stop_pre() {
+ supervise-daemon $RC_SVCNAME --signal TERM
+}
+