From b438df821a6c624d5a88792c34a0f25aad64c1d8 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Sun, 21 Jul 2024 10:31:34 -0500 Subject: [PATCH] Rename files to snake_case --- README.org | 15 ++++++++++++++- bin/{add-scihub-torrents => add_scihub_torrents} | 0 bin/{qbt-sum-size => qbt_sum_size} | 0 ...eed-armbian-torrents => seed_armbian_torrents} | 0 ...{seed-scihub-torrents => seed_scihub_torrents} | 0 bin/{server0-backup => server0_backup} | 0 6 files changed, 14 insertions(+), 1 deletion(-) rename bin/{add-scihub-torrents => add_scihub_torrents} (100%) rename bin/{qbt-sum-size => qbt_sum_size} (100%) rename bin/{seed-armbian-torrents => seed_armbian_torrents} (100%) rename bin/{seed-scihub-torrents => seed_scihub_torrents} (100%) rename bin/{server0-backup => server0_backup} (100%) diff --git a/README.org b/README.org index ccb6503..e514edf 100644 --- a/README.org +++ b/README.org @@ -1,3 +1,16 @@ #+title: homelab-scripts -Assorted scripts I use for my homelab. My homelab consists of my TrueNAS machine and my three Orange Pi 5+'s. These scripts are mostly for the latter. +These are scripts I use to automate various tasks in my homelab. + +** bin +- ~add_scihub_torrents~ : This script uses [[https://github.com/charmbracelet/gum][gum]] to select paginated text files that contain URLs of Sci Hub torrent files. For each selected file, the URLs are read and added to a qBittorrent instance. +- ~qbth~ : This is a helper program for adding Linux and BSD distros to a qBittorrent instance. +- ~qbt_sum_size~ : This script prints the total size of completed torrents and the total size of all torrents added to a qBittorrent instance. The former is a subset of the latter. +- ~seed_armbian_torrents~ : This script downloads an archive from Armbian, extracts the torrent files within to a temporary directory, and adds each file to a qBittorrent instance. It first removes older Armbian torrents from the qBittorrent instance. +- ~seed_scihub_torrents~ : This script finds which torrents have less than or equal to N seeders, where N is an integer argument supplied by the user. It then adds these torrents to a qBittorrent instance. +- ~server0_backup~ : This script dumps my Mastodon instance's PostgreSQL database, then uses rclone to sync ~/etc~, ~/var/log~, and ~/home/jas~ to an S3-compatible object storage bucket. It also copies the dumped Mastodon database and ~.env.production~ to the object storage bucket. + +** systemd +*** system +- ~server0-backup.service~ : A systemd service unit that runs the ~server0-backup~ script. +- ~server0-backup.timer~ : A systemd timer unit that triggers the corresponding service unit. diff --git a/bin/add-scihub-torrents b/bin/add_scihub_torrents similarity index 100% rename from bin/add-scihub-torrents rename to bin/add_scihub_torrents diff --git a/bin/qbt-sum-size b/bin/qbt_sum_size similarity index 100% rename from bin/qbt-sum-size rename to bin/qbt_sum_size diff --git a/bin/seed-armbian-torrents b/bin/seed_armbian_torrents similarity index 100% rename from bin/seed-armbian-torrents rename to bin/seed_armbian_torrents diff --git a/bin/seed-scihub-torrents b/bin/seed_scihub_torrents similarity index 100% rename from bin/seed-scihub-torrents rename to bin/seed_scihub_torrents diff --git a/bin/server0-backup b/bin/server0_backup similarity index 100% rename from bin/server0-backup rename to bin/server0_backup