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/sh | |
### Custom user script | |
### Called after internal VPN client connected/disconnected to remote VPN server | |
### $1 - action (up/down) | |
### $IFNAME - tunnel interface name (e.g. ppp5 or tun0) | |
### $IPLOCAL - tunnel local IP address | |
### $IPREMOTE - tunnel remote IP address | |
### $DNS1 - peer DNS1 | |
### $DNS2 - peer DNS2 |
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 | |
# pacmac - 2020-03-22 | |
# fast-ping list-of-hosts | current-host | |
# fast-ping "uk-berkshire-2-ca-version-2.expressnetw.com,uk-east-london-ca-version-2.expressnetw.com" "uk-east-london-ca-version-2.expressnetw.com" | |
# fast-ping "uk-berkshire-2-ca-version-2.expressnetw.com,uk-east-london-ca-version-2.expressnetw.com" | |
## Initial Defaults | |
Smallest=1000000 | |
Server="" |
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
OFFS=""; | |
NOW=$(date +%H:%M) | |
SENDER="[email protected]" | |
RECIP="[email protected]" | |
## MORNING | |
MORN_S="09:30" | |
MORN_E="12:30" |
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
wget https://s3.amazonaws.com/plugable/bin/fw-0a5c_21e8.hcd; | |
mv fw-0a5c_21e8.hcd /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd; | |
cp /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e8.hcd; |
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 | |
STAMP=`date "+%y%m%d-%H:%M:%S"` | |
FILE="/var/log/ping.log" | |
ISUP="DOWN" | |
_update () { | |
if [ ! -f "$FILE" ]; then | |
echo "$STAMP $ISUP" > $FILE | |
fi |
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 | |
## bash <(curl -Ls https://gist.github.com/pacmac/41651c4f19c4760ebb20b5de0ee0476f/raw/) | |
## curl -o ufw-dns -L https://gist.github.com/pacmac/41651c4f19c4760ebb20b5de0ee0476f/raw/ | |
## */5 * * * * bash <(curl -s https://gist.github.com/pacmac/41651c4f19c4760ebb20b5de0ee0476f/raw/) | |
HOSTNAME="$1"; | |
if [ $# -eq 0 ]; then | |
echo "Hostname is required"; | |
exit 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
## Move default mysql databases to new volume. | |
############################################## | |
# https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04 | |
echo "This cannot be executed" | |
exit 1; | |
## Backup before we start just in case. | |
/usr/share/scripts/cron/mybackup.sh |
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
; allow root access from any host | |
GRANT ALL ON *.* to 'root'@'%' IDENTIFIED BY 'your-password-here'; | |
; switch to native passwords | |
update mysql.user set plugin = 'mysql_native_password' where User='root'; | |
; apply changes | |
Flush privileges; |
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
MYSQL="$(which mysql)"; | |
GUNZIP="$(which gunzip)"; | |
## Usage | |
if [ $1 == "help" ];then | |
echo "usage myrestore [DBNAME] [filename.sql|filename.sql.gz]" | |
echo "myrestore MYDB mydb.12345.sql.gz"; | |
exit 0; | |
fi |
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
# Sample variables file for BCM94356Z NGFF 22x30mm iPA, iLNA board with PCIe for production package | |
NVRAMRev=$Rev: 492104 $ | |
#4356 chip = 4354 A2 chip | |
sromrev=11 | |
boardrev=0x1102 | |
boardtype=0x073e | |
boardflags=0x02400201 | |
#0x2000 enable 2G spur WAR | |
boardflags2=0x00802000 | |
boardflags3=0x0000000a |