configuration-templates
/monit/macOS/monitrc |
@@ -0,0 +1,19 @@ |
########################################################################### |
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
########################################################################### |
|
set daemon 30 # check services at 30 seconds intervals |
set logfile syslog |
set pidfile /usr/local/var/run/monit.pid |
|
# Enable only if using mmonit and set the IP and credentials accordingly. |
# set mmonit http://monit:monit@192.168.0.1:8080/collector |
# and register without credentials # Don't register credentials |
|
set httpd port 2812 and |
use address localhost # only accept connection from localhost |
allow localhost # allow localhost to connect to the server and |
allow admin:monit # require user 'admin' with password 'monit' |
|
# Include all templates from this directory. |
include /usr/local/etc/monit/conf.d/* |
/monit/macOS/templates/openvpn |
@@ -0,0 +1,18 @@ |
########################################################################### |
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
########################################################################### |
|
# The file assumes the following configuration: |
# * tap0 is the TAP interface. |
# * 1.1.1.1 is the point-to-point VPN gateway. |
|
check process openvpn with pidfile /usr/local/var/run/openvpn/tap0.pid |
start program = "launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist" |
stop program = "launchctl unload /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist" |
|
check host tap0 with address 1.1.1.1 |
start program = "launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist" |
stop program = "launchctl unload /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist" |
if failed |
icmp type echo count 5 with timeout 15 seconds |
then restart |