ctucx.git: ansible-configs

My personal ansible roles and playbooks

commit bc8fb8338522fc2585df3bc515c1c6e6603ab455
parent 82c7fc63730451155b051edd30d14bd6f93771c7
Author: Leah Thein <leah@toaster.fritz.box>
Date: Sat, 5 Dec 2020 13:38:57 +0100

maddy: be sure to kill it
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/config-files/maddy/maddy-service.patch b/config-files/maddy/maddy-service.patch
@@ -0,0 +1,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
++}
++
diff --git a/roles/maddy/tasks/main.yml b/roles/maddy/tasks/main.yml
@@ -28,6 +28,11 @@
     group: maddy
     mode:  0644
 
+- name: "Patch file: /etc/init.d/maddy"
+  patch:
+    src: config-files/maddy/maddy-service.patch
+    dest: /etc/init.d/maddy
+
 - name: Copy mail firewall-rule to destination host
   copy:
     src: config-files/awall/mail.json