diff --git a/roles/shell/files/etc/cron.hourly/znc_saveconfig.sh b/roles/shell/files/etc/cron.hourly/znc_saveconfig.sh new file mode 100644 index 0000000..42c19ad --- /dev/null +++ b/roles/shell/files/etc/cron.hourly/znc_saveconfig.sh @@ -0,0 +1,6 @@ +#!/bin/dash + +PID=$(pgrep -u znc znc) + +#Rewrite znc.conf +[ $PID ] && kill -s USR1 $PID diff --git a/roles/shell/tasks/znc.yml b/roles/shell/tasks/znc.yml index 326075a..b5c6ad7 100644 --- a/roles/shell/tasks/znc.yml +++ b/roles/shell/tasks/znc.yml @@ -56,3 +56,11 @@ allow spoof_all } } + +- name: Rewrite znc.conf + copy: + src: ../files/etc/cron.hourly/znc_saveconfig.sh + dest: /etc/cron.hourly/znc_saveconfig.sh + owner: root + group: znc + mode: 0754