--- 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 +} +