Skip to content

Instantly share code, notes, and snippets.

@mikejsutherland
mikejsutherland / gwmonitor.sh
Last active Feb 22, 2020
Simple pfsense WAN connection monitor with auto reset and notification
View gwmonitor.sh
#!/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 Oct 9, 2017
Nagios NRPE installation script for FreeNAS
View install.sh
#!/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