Created
August 8, 2017 01:16
-
-
Save StephenRadachy/cea5ac78821062e3b6145007ebaf420c to your computer and use it in GitHub Desktop.
useful pfsense cron scripts
This file contains 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
# Restart All OpenVPN connections | |
echo "<?php include('openvpn.inc'); openvpn_resync_all();?>" | /usr/local/bin/php -q >/dev/null 2>&1 | |
# Speedtest (pip install speedtest-cli) to /var/log/speedtest.log | |
# format: <download as float>,<download unit (Mbit/s,Gbit/s)>,<upload as float>,<upload unit (Mbit/s,Gbit/s)>,<unix timestamp> | |
/usr/local/bin/speedtest | /usr/bin/grep "Download:\|Upload:" | /usr/bin/sed -E -e 's/Download: |Upload: //g' | /usr/bin/tr '[:space:]' ',' | /usr/bin/awk '{srand(); print $0 srand()}' >> ./speedtest.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment