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
| #!/bin/bash | |
| # v 1.0.1 | |
| # https://gist.github.com/mbierman/f81b591fd27638b9f4221e9525229eca | |
| echo -e "How many minutes before now?" | |
| read minutes | |
| # min=$(date -v-${minutes}M +%s) | |
| minutes=${minutes:=0} | |
| echo -e "You entered $minutes minutes\n\n" |
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
| #!/bin/bash | |
| # v 2.0 | |
| # https://gist.github.com/mbierman/03b2a962ac04963ef5bbc8354d0ed5d1 | |
| # 2022 mbierman | |
| sleep="${1:-6}" | |
| regex="^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$" | |
| getmac () { | |
| rnd=$(openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/') |
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
| #!/bin/bash | |
| retain=30 | |
| # This script will create a Teleport backup to a directory that it is run in. | |
| # Change to mapped directory | |
| cd /home/ubuntu/backups | |
| # Run Backup | |
| pihole -a -t & | |
| # Record the process id and wait |
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
| #!/bin/bash | |
| # v 1.01 | |
| # https://gist.githubusercontent.com/mbierman/ced69a41181637995f61323e7ac97cba/raw/214028a0430b5a54788ca727849aca84f0aed594/install_FWToys.sh | |
| dir="/home/pi/.firewalla/config/post_main.d/" | |
| app="install_sshpass.sh" | |
| cd $dir |
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
| #!/bin/bash | |
| # v2.0 | |
| # https://gist.github.com/mbierman/dd9fd1b89220af98dea74b2ab95a9f15 | |
| # Put this script in ~/.firewalla/config/post_main.d in order to resinstall after upgrades | |
| log=/data/fw_reboot.txt | |
| if ! [ -w $log ] ; then | |
| sudo touch $log | |
| sudo chmod a+w $log |
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
| #!/bin/bash | |
| # v 2.0 | |
| # https://gist.github.com/mbierman/362193a8cfaf14361945c27c48692d50 | |
| # Put this script in ~/.firewalla/config/post_main.d in order to resinstall after upgrades | |
| log=/data/fw_reboot.txt | |
| app=sshpass | |
| edate=$(date +'%a %b %d %H:%M:%S %Z %Y') |
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
| 9 3 * * mon,wed,fri root echo $(date) > /var/log/pihole_updateGravity.log && /usr/local/bin/pihole updateGravity | tee -a /var/log/pihole_updateGravity.log |
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
| #!/bin/bash | |
| reboot=false | |
| if [ ! -f ~/.firewalla/config/dnsmasq_local/staylocal ] ; then | |
| echo -e "local=/lan/127.0.0.2\nlocal=/local/127.0.0.2\nlocal=/lan22/127.0.0.2\nlocal=/lan33/127.0.0.2\nlocal=/lan44/127.0.0.2\nlocal=/lan55/127.0.0.2\nlocal=/lan66/127.0.0.2\nlocal=/gst/127.0.0.2" > ~/.firewalla/config/dnsmasq_local/staylocal | |
| echo dnsmasq: staylocal configured | |
| reboot=true | |
| else | |
| echo dnsmasq: staylocal exists, nothing to do |
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
| #!/bin/bash | |
| target="${1:-google.com}" | |
| echo testing $target | |
| main() | |
| { | |
| # Enter the DNS providers you want to test | |
| hosts='[ | |
| { |
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
| #!/bin/bash | |
| # v 2.0 | |
| # https://gist.github.com/mbierman/bc6b9f11c82f6fd7efdafac269fb058d | |
| # Put this script in ~/.firewalla/config/post_main.d in order to resinstall after upgrades | |
| log=/data/fw_reboot.txt | |
| if ! [ -w $log ] ; then | |
| sudo touch $log | |
| sudo chmod a+w $log |