I hereby claim:
- I am aivanise on github.
- I am aivanise (https://keybase.io/aivanise) on keybase.
- I have a public key ASD_dbXC4yW_EGPySAIKQMWoHv2RGKcgqEp-qlVhZvQfBwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# nordvpn control script for debian/ubuntu | |
# extra packages needed: fzf jq | |
# run without paramaters - present a picker with countries list, them pick a random server from that country | |
# vpn country - pick a random server from specified country | |
# vpn stop/start/status - run systemctl stop/start/status | |
# vpn config - see configured country | |
# put your nordvpn user/pass in /etc/openvpn/client/nordvpn |
#!/bin/bash | |
# backup full image of the SD card to arbitrary directory and keep a number of them | |
# requires basyn: https://github.com/stvorl/basyn | |
# if parameter given, override the destination (i.e. an alternative sdcard) | |
DEST=/mnt/eksterni/backup/rock64-microsd.img | |
DESTDIR=/mnt/eksterni/backup/ | |
DESTKEEPDAYS=30 |
#!/bin/bash | |
# zero all the free blocks on a (mounted) root fs to TRIM it | |
# and/or make it more compressible for backups | |
# during this process the machine is basically dead (only ssh works) | |
# reboots at the end | |
systemctl isolate rescue-ssh | |
sleep 3 | |
systemctl stop systemd-journald.socket |
#!/bin/bash | |
# exec a command across lxc cluster | |
Usage() { | |
cat <<EOHELP | |
run a command across a LXD cluster | |
Usage: $(basename $0) -s -f filter -u uservar=value -p project command |
#!/bin/bash | |
# build a nested lxd lxd ;) container using the host zfs | |
set -o errexit | |
if [[ -z "$1" ]]; then | |
echo "usage $0 hostname cluster_host [ pool_name ] [ cluster_password ]" | |
echo "usage $0 lxd3 lxd1 rpool/lxd3" | |
exit |
#!/bin/bash | |
# | |
# automatic (linux) router failover script | |
# pings around and changes the default route to backup | |
# if all the sites are not available for TIMEOUT seconds | |
# source the script to get useful control functions (type help for help) | |
# run it every minute or so to fail the default route over automatically | |
# depoending on the availability of the IPs |