An assortment of bash scripts I have developed for various reasons. For the most part, they just make it faster or simpler for me to carry out certain tasks. These are all available on gitlab. Click on the script name to go directly to the gitlab page.
Name | Description |
---|---|
apt_all | Runs apt-get update, apt-get dist-upgrade, apt-get autoremove and apt-get autoclean on a provided host or list of hosts. |
p0wer_switch | Written for use with termux to connect to a server that can control wireless mains outlets via p0wer. |
polly | Called as a cronjob to regularly poll a web site and check the return code. Logs the result and uses a blink(1) as a visual status indicator. |
pong | Runs through a list of servers, pings each once for a second then returns a success or fail result. |
sneak | Use rsync to pull the contents of a directory on a remote machine to the local machine. Intended to be implemented as a cronjob to responsibly transfer files under limited bandwidth restrictions. |
stuff | Pulls and lists a bunch of useful (to me) info about the host (hardware, disks/mounts, OS, network, etc). |
terbling | Prints an ascii-art logo and some basic system info to the command line. |
vpn | Kills current openvpn service then reconnects and confirms. Useful for quickly establishing or re-establishing a vpn connection. |
wami | Pulls and displays info (IP, country, city, etc) from ifconfig.co. Useful to verify vpn/wireguard connection. Previously wami used ipinfo.io to source ip data, but ifconfig.co is a great, open-source, self-hostable project and is generally just a lot nicer. |
whodis | Grabs the contents of the /tmp/dhcp.leases file on a remote router, pretties it up and prints it to stdout. |
Additional assorted scripts I developed but no longer use. These are still available on gitlab. Click on the script name to go directly to the gitlab page.
Name | Description |
---|---|
ball | Runs bu on a bunch of remote host or list of hosts. Deprecated thanks to Ansible. |
bu | Uses rsync to back up files and directories defined in a list file to a remote server. Also deprecated thanks to Ansible. |
cal_backup.sh | Generates an *.ics file from a nextcloud calendar and archives it. Intended to be used as a cronjob. No longer used since migrating my nextcloud service to a docker container. |
chuck.sh | Very similar to grab.sh, but used to upload to the remote server. Originally used to circumvent some corporate proxy restrictions - no longer used. |
grab.sh | Uses rsync (to allow resume after interruption) to download a specified file from a remote server. Originally used to circumvent some corporate proxy restrictions - no longer used. |
nc_backup.sh | Creates a local copy of all the data files from a nextcloud instance - including a mysqldump of the database. No longer used since migrating my nextcloud service to a docker container. |
roll_out.sh | Attempt to copy a specified file/directory to a destination (relative to home directory) on a list of remote hosts. I used this to sync my custom scripts to a list of hosts. Now deprecated as I manage this task with Ansible. |
ytdl | Written for use with termux to download a youtube video direct to the device. No longer used often since running NewPipe instead of the youtube app. NewPipe has direct download capability. |