scripts

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.sh Runs apt-get update, apt-get dist-upgrade, apt-get autoremove and apt-get autoclean on a provided host or list of hosts.
ball.sh Runs bu.sh on a bunch of remote host or list of hosts.
bu.sh Uses rsync to back up files and directories defined in a list file to a remote server.
p0wer_switch.sh Written for use with termux to connect to a server that can control wireless mains outlets via p0wer.
pong.sh Runs through a list of servers, pings each once for a second then returns a success or fail result.
polly.sh 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.
stuff.sh Pulls and lists a bunch of useful (to me) info about the host (hardware, disks/mounts, OS, network, etc).
vpn.sh Kills current openvpn service then reconnects and confirms. Useful for quickly establishing or re-establishing a vpn connection.
wami.sh Pulls and displays info (IP, country, city, etc) from ipinfo.io - useful to verify vpn operation.
whodis.sh Grabs the contents of the /tmp/dhcp.leases file on a remote router, pretties it up and prints it to stdout.


Archived scripts

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
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.sh ytdl.sh - Written for use with termux to download a youtube video direct to the device. Archived as I no longer use this since switching to LineageOS and running NewPipe instead of the youtube app. NewPipe has direct download capability.