-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmonitrc
24 lines (18 loc) · 902 Bytes
/
monitrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SET DAEMON 10
WITH START DELAY 60
check process OpenVPN matching "openvpn"
start program = "/bin/systemctl start openvpn@PIAvpn"
stop program = "/bin/systemctl stop openvpn"
check network tun0 with interface tun0
if failed link for 3 cycles then exec '/home/pi/vpnfix.sh'
check network restartOpenVPN with interface tun0
if failed link then exec "/bin/systemctl reload-or-restart openvpn@PIAvpn"
check host google.com with address google.com
if failed port 443 protocol https for 3 cycles then exec '/home/pi/vpnfix.sh'
check file vpnfix.log with path /home/pi/vpnfix.log
start "/bin/bash -c 'touch /home/pi/vpnfix.log && chown pi:pi /home/pi/vpnfix.log && chmod 666 /home/pi/vpnfix.log'"
if size > 1000 MB then exec "/bin/rm /home/pi/vpnfix.log"
set httpd port 2812 and
use address localhost
allow localhost
allow admin:monit