Fix conditional, tweak monit wireguard monitoring configuration

This commit is contained in:
KemoNine 2020-08-05 01:02:57 +00:00
parent aed60c31ff
commit adfd8a3ba3
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
when: {{ monit_wireguard }} when: monit_wireguard
notify: notify:
- restart monit - restart monit
tags: tags:

View file

@ -1,5 +1,5 @@
check host wireguard address {{ monit_wireguard_ip }} check host wireguard address {{ monit_wireguard_ip }}
start program = "/usr/bin/systemctl start wg-quick@wg0" start program = "/usr/bin/systemctl start wg-quick@wg0"
stop program = "/usr/bin/systemctl stop wg-quick@wg0" stop program = "/usr/bin/systemctl stop wg-quick@wg0"
if does not exist then alert if failed then alert
if does not exist for 3 cycles then restart if failed for 3 cycles then restart