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.
|Runs apt-get update, apt-get dist-upgrade, apt-get autoremove and apt-get autoclean on a provided host or list of hosts.
|Written for use with termux to connect to a server that can control wireless mains outlets via p0wer.
|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.
|Runs through a list of servers, pings each once for a second then returns a success or fail result.
|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.
|Pulls and lists a bunch of useful (to me) info about the host (hardware, disks/mounts, OS, network, etc).
|Prints an ascii-art logo and some basic system info to the command line.
|Kills current openvpn service then reconnects and confirms. Useful for quickly establishing or re-establishing a vpn connection.
|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.
|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.
|Runs bu on a bunch of remote host or list of hosts. Deprecated thanks to Ansible.
|Uses rsync to back up files and directories defined in a list file to a remote server. Also deprecated thanks to Ansible.
|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.
|Very similar to grab.sh, but used to upload to the remote server. Originally used to circumvent some corporate proxy restrictions - no longer used.
|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.
|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.
|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.
|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.