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
#!/bin/bash | |
# v 1.0.2 | |
# https://gist.github.com/mbierman/03b2a962ac04963ef5bbc8354d0ed5d1 | |
# 2022 mbierman | |
sleep="${1:-5}" | |
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 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/env bash | |
zoneID="" | |
ID="" | |
APIToken="-" | |
name="." | |
days=2020 | |
result="" | |
# */5 * * * * /home/pi/.firewalla/config/post_main.d/updateIPCloudflare.sh >/dev/null 2>&1walla" ]; then |
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
#!/bin/bash | |
#v 1.0.2 | |
URL=$1 | |
# Function to get the description for the certificate result | |
get_certificate_description() { | |
case $certificate_result in | |
0) echo "The certificate verification was successful." ;; | |
1) echo "The certificate could not be found." ;; |
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
#!/bin/bash | |
# v 2.7 | |
# https://gist.github.com/mbierman/dd45821b53d5d22147cef217f0c0fe95 | |
# Variables | |
update="false" | |
reboot="false" | |
hostname=$(hostname) | |
docker="/.dockerenv" |
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
#!/bin/bash | |
# v 2.1.0 | |
syslog=/etc/rsyslog.d/09-externalserver.conf | |
# this logs notice and above. use *.* log everything. | |
filter=*.notice | |
server=192.168.0.19 # Change the server to the IP of your syslog server. | |
port=514 | |
hostname=firewalla | |
valid=$(grep "$server:$port" $syslog 2>/dev/null) |
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
#!/bin/bash | |
# https://gist.github.com/mbierman/6a32df2909202c373a6a39063181dc40 | |
# v 0.4.1 | |
BASEDIR=$(dirname $0) | |
IFTTTKEY="$(cat $BASEDIR/IFTTT.data | grep IFTTTKEY| cut -f2 -d "=" )" | |
EVENT="FWspeedtest" | |
log=/data/logs/logspeed.log | |
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
Save this to ~/.firewalla/config/post_main.d inorder to make sure homebridge restarts automatically every time Firewalla does. That directory may not exist so just create it if that's the case. |
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
#!/bin/bash | |
# Variables | |
result="" | |
count=0 | |
log=/data/logs/lights.log | |
private=/home/pi/.firewalla/config/post_main.d/pass.txt | |
dir=$(dirname "$0") | |
user=$(cat $dir/lights.txt | grep user | cut -f2 -d "=" ) | |
baseIP=192.168.0 |
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
#i!/bin/bash | |
# version 3.1.2 | |
# https://gist.github.com/mbierman/6cf22430ca0c2ddb699ac8780ef281ef | |
DOCKER=$(which docker) | |
wait=1 | |
image=$1 | |
if [ "$1" = "homebridge" ]; then |
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
#!/bin/bash | |
# V 1.0 | |
# Copyright Michael Bierman | |
# https://gist.github.com/mbierman/85c9672d212bdda09d9d4f5d27574d1f | |
mount_point=/mnt/usb-stick/ | |
mounted=$(mount -l | grep -c "/mnt/usb-stick") | |
if [ "$1" = "u" ] && [ "$mounted" -eq "1" ] ; then | |
read -p "Want to Unmount the drive. Please press 'Y' to continue or any key to stop: " -n1 now |
NewerOlder