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
{ | |
"interface": { | |
"address": "10.7.0.46/24", | |
"key": "UBt/KAdhDmDOFoV/o4cfa0TuKfkDzylwSVqodOqmnng=", | |
"dns": "1.1.1.1" | |
}, | |
"peer": { | |
"pubkey": "DXn0oXV5/5fCtgKlf9VjqKkECX/wibquJYX6/9wCASM=", | |
"psk": "pLCsTZFxtxlMIYA/IDVLhhEqLZzIQZ1L3CUgh78UoLc=", | |
"allowed_ips": "0.0.0.0/0", |
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
vpnpass() { | |
printf "$R_PIN`oathtool -b --totp $R_TOKEN`" | pbcopy | |
} | |
vpnsetup() { | |
sudo sh -c 'echo "${SUDO_USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/openconnect' | |
} | |
vpnstart() { | |
vpnpass |
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 | |
echo "" | |
echo "resizing root filesystem" | |
echo "" | |
ROOTDEVICE=$(mount | grep 'on / type' | awk '{print $1}' | sed 's,^/dev/,,g') | |
ROOTFSTYPE=$(mount | grep 'on / type' | awk '{print $5}') | |
ROOTPARTUUID=$(blkid | grep "/dev/$ROOTDEVICE" | awk '{print $5}' | sed 's,",,g' | awk -F= '{print $2}') |