This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cp netmonitor.sh /usr/bin/netmonitor.sh | |
sudo chmod 755 /usr/bin/netmonitor.sh | |
sudo crontab -e | |
Add to crontab: | |
*/2 * * * * /usr/bin/netmonitor.sh 2>&1 | /usr/bin/logger -t netmonitor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Updates IP addresses of a SmartOS VM | |
# This script stops the VM, updates the IP address(es), | |
# and starts the VM back up. | |
# | |
# Usage: | |
# vmip.sh <uuid> <ip1> [ip2] [ip3] [...] | |
# | |
# The IP's are applied to NICs of the VM in order. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install necessary packages | |
pkgin up | |
pkgin -y in \ | |
bash \ | |
coreutils \ | |
curl \ | |
gcc47 \ | |
gcc47-runtime \ | |
gmake \ | |
icu \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Monit on pfSense 2.4 ARM (SG-1000) | |
# Install the package from the FreeBSD repository | |
pkg add http://pkg.freebsd.org/FreeBSD:11:armv6/latest/All/monit-5.18.txz | |
# Rename the rc.d script to .sh and fix permissions so pfSense will start it automatically | |
mv /usr/local/etc/rc.d/monit /usr/local/etc/rc.d/monit.sh | |
chmod 0755 /usr/local/etc/rc.d/monit.sh | |
# Add monit_enable=YES to a local rc.conf |