Skip to content

Instantly share code, notes, and snippets.

@mikejsutherland
mikejsutherland / gwmonitor.sh
Last active February 22, 2020 17:51
Simple pfsense WAN connection monitor with auto reset and notification
#!/bin/sh
WWW="https://google.com"
DELAY=30
FAILLIMIT=2
ITERATION=5
www_test() {
RES=`curl -s -L -X HEAD -4 -o /dev/null --connect-timeout 30 -m 60 $WWW`
@mikejsutherland
mikejsutherland / install.sh
Last active October 9, 2017 02:22
Nagios NRPE installation script for FreeNAS
#!/bin/sh
#
# Nagios NRPE installation script for FreeNAS
# See: https://haphazard.io/blog/install-nagios-nrpe-on-freenas/#install
#
# Copyright 2017 Michael Sutherland
# mike@haphazard.io
#
# Check if nrpe service is already installed/running