diff --git a/miscellaneous/bash/README.md b/miscellaneous/bash/README.md new file mode 100644 index 0000000..876aa67 --- /dev/null +++ b/miscellaneous/bash/README.md @@ -0,0 +1,41 @@ +# bin-there-done-that + + + +A sysadmin’s personal graveyard of hacks, helpers, one-liners, and scripts that probably shouldn’t work β€” but absolutely do. + +This is where the magic happens: +- πŸ”§ Server bootstraps +- πŸ“¦ ZFS snapshot management +- 🧼 Cron-powered cleanup rituals +- ☠️ Disaster recovery with no disasters (yet) +- 🐒 Slow rsyncs. Fast regrets. + +> **Status:** In production. Against better judgment. + +--- + +## βš™οΈ Highlights + +- `pull_health_everywhere.sh` – because you can’t fix what you don’t know is broken +- `dr_spl_overlay.sh` – tape drive energy for modern times +- `fix_mastodon_perms.sh` – chown your sins away +- `validate_zfs_snapshots.sh` – trust but verify (and scrub) +- `freezer.sh` – it's like a backup, but colder + +--- + +## πŸ“Œ Philosophy + +- Flat files > Object storage +- ZFS is life +- Automation is king +- Users lie and take up space + +--- + +## 🧠 Use at your own risk + +This repo is for *me*. If you find it useful, cool. If it destroys your cluster, you probably shouldn’t have been copying scripts from a repo with this name anyway. + + diff --git a/miscellaneous/bash/backup.sh b/miscellaneous/bash/bin/backup.sh similarity index 100% rename from miscellaneous/bash/backup.sh rename to miscellaneous/bash/bin/backup.sh diff --git a/miscellaneous/bash/clean_media.sh b/miscellaneous/bash/bin/clean_media.sh similarity index 100% rename from miscellaneous/bash/clean_media.sh rename to miscellaneous/bash/bin/clean_media.sh diff --git a/miscellaneous/bash/clean_orphans.sh b/miscellaneous/bash/bin/clean_orphans.sh similarity index 100% rename from miscellaneous/bash/clean_orphans.sh rename to miscellaneous/bash/bin/clean_orphans.sh diff --git a/miscellaneous/bash/clean_previewcards.sh b/miscellaneous/bash/bin/clean_previewcards.sh similarity index 100% rename from miscellaneous/bash/clean_previewcards.sh rename to miscellaneous/bash/bin/clean_previewcards.sh diff --git a/miscellaneous/bash/copydunkadunk.sh b/miscellaneous/bash/bin/copydunkadunk.sh similarity index 100% rename from miscellaneous/bash/copydunkadunk.sh rename to miscellaneous/bash/bin/copydunkadunk.sh diff --git a/miscellaneous/bash/dasystemisdownyo.sh b/miscellaneous/bash/bin/dasystemisdownyo.sh similarity index 100% rename from miscellaneous/bash/dasystemisdownyo.sh rename to miscellaneous/bash/bin/dasystemisdownyo.sh diff --git a/miscellaneous/bash/db2_backup.sh b/miscellaneous/bash/bin/db2_backup.sh similarity index 100% rename from miscellaneous/bash/db2_backup.sh rename to miscellaneous/bash/bin/db2_backup.sh diff --git a/miscellaneous/bash/deldirectories.sh b/miscellaneous/bash/bin/deldirectories.sh similarity index 100% rename from miscellaneous/bash/deldirectories.sh rename to miscellaneous/bash/bin/deldirectories.sh diff --git a/miscellaneous/bash/disk_mitigator.sh b/miscellaneous/bash/bin/disk_mitigator.sh similarity index 100% rename from miscellaneous/bash/disk_mitigator.sh rename to miscellaneous/bash/bin/disk_mitigator.sh diff --git a/miscellaneous/bash/do_the_needful.sh b/miscellaneous/bash/bin/do_the_needful.sh similarity index 100% rename from miscellaneous/bash/do_the_needful.sh rename to miscellaneous/bash/bin/do_the_needful.sh diff --git a/miscellaneous/bash/dotheneedfuleverywhere.sh b/miscellaneous/bash/bin/dotheneedfuleverywhere.sh similarity index 100% rename from miscellaneous/bash/dotheneedfuleverywhere.sh rename to miscellaneous/bash/bin/dotheneedfuleverywhere.sh diff --git a/miscellaneous/bash/dr_mirror_to_linode.sh b/miscellaneous/bash/bin/dr_mirror_to_linode.sh similarity index 100% rename from miscellaneous/bash/dr_mirror_to_linode.sh rename to miscellaneous/bash/bin/dr_mirror_to_linode.sh diff --git a/miscellaneous/bash/dr_telegram_alert.sh b/miscellaneous/bash/bin/dr_telegram_alert.sh similarity index 100% rename from miscellaneous/bash/dr_telegram_alert.sh rename to miscellaneous/bash/bin/dr_telegram_alert.sh diff --git a/miscellaneous/bash/fix_queue.sh b/miscellaneous/bash/bin/fix_queue.sh similarity index 100% rename from miscellaneous/bash/fix_queue.sh rename to miscellaneous/bash/bin/fix_queue.sh diff --git a/miscellaneous/bash/fix_queue2.sh b/miscellaneous/bash/bin/fix_queue2.sh similarity index 100% rename from miscellaneous/bash/fix_queue2.sh rename to miscellaneous/bash/bin/fix_queue2.sh diff --git a/miscellaneous/bash/fix_queue3.sh b/miscellaneous/bash/bin/fix_queue3.sh similarity index 100% rename from miscellaneous/bash/fix_queue3.sh rename to miscellaneous/bash/bin/fix_queue3.sh diff --git a/miscellaneous/bash/fixsudoerseverywhere.sh b/miscellaneous/bash/bin/fixsudoerseverywhere.sh similarity index 100% rename from miscellaneous/bash/fixsudoerseverywhere.sh rename to miscellaneous/bash/bin/fixsudoerseverywhere.sh diff --git a/miscellaneous/bash/freezer.sh b/miscellaneous/bash/bin/freezer.sh similarity index 100% rename from miscellaneous/bash/freezer.sh rename to miscellaneous/bash/bin/freezer.sh diff --git a/miscellaneous/bash/freezermove.sh b/miscellaneous/bash/bin/freezermove.sh similarity index 100% rename from miscellaneous/bash/freezermove.sh rename to miscellaneous/bash/bin/freezermove.sh diff --git a/miscellaneous/bash/genesis_check.sh b/miscellaneous/bash/bin/genesis_check.sh similarity index 100% rename from miscellaneous/bash/genesis_check.sh rename to miscellaneous/bash/bin/genesis_check.sh diff --git a/miscellaneous/bash/genesis_sync_progress.sh b/miscellaneous/bash/bin/genesis_sync_progress.sh similarity index 100% rename from miscellaneous/bash/genesis_sync_progress.sh rename to miscellaneous/bash/bin/genesis_sync_progress.sh diff --git a/miscellaneous/bash/get_telegram_id.sh b/miscellaneous/bash/bin/get_telegram_id.sh similarity index 100% rename from miscellaneous/bash/get_telegram_id.sh rename to miscellaneous/bash/bin/get_telegram_id.sh diff --git a/miscellaneous/bash/giteapushv3.sh b/miscellaneous/bash/bin/giteapushv3.sh similarity index 100% rename from miscellaneous/bash/giteapushv3.sh rename to miscellaneous/bash/bin/giteapushv3.sh diff --git a/miscellaneous/bash/hardenit.sh b/miscellaneous/bash/bin/hardenit.sh similarity index 100% rename from miscellaneous/bash/hardenit.sh rename to miscellaneous/bash/bin/hardenit.sh diff --git a/miscellaneous/bash/kodakmoment.sh b/miscellaneous/bash/bin/kodakmoment.sh similarity index 100% rename from miscellaneous/bash/kodakmoment.sh rename to miscellaneous/bash/bin/kodakmoment.sh diff --git a/miscellaneous/bash/kodakmomentproxmox.sh b/miscellaneous/bash/bin/kodakmomentproxmox.sh similarity index 100% rename from miscellaneous/bash/kodakmomentproxmox.sh rename to miscellaneous/bash/bin/kodakmomentproxmox.sh diff --git a/miscellaneous/bash/krang_backup.sh b/miscellaneous/bash/bin/krang_backup.sh similarity index 100% rename from miscellaneous/bash/krang_backup.sh rename to miscellaneous/bash/bin/krang_backup.sh diff --git a/miscellaneous/bash/krang_modular_health.sh b/miscellaneous/bash/bin/krang_modular_health.sh similarity index 100% rename from miscellaneous/bash/krang_modular_health.sh rename to miscellaneous/bash/bin/krang_modular_health.sh diff --git a/miscellaneous/bash/malips.sh b/miscellaneous/bash/bin/malips.sh similarity index 100% rename from miscellaneous/bash/malips.sh rename to miscellaneous/bash/bin/malips.sh diff --git a/miscellaneous/bash/mastodon_restart.sh b/miscellaneous/bash/bin/mastodon_restart.sh similarity index 100% rename from miscellaneous/bash/mastodon_restart.sh rename to miscellaneous/bash/bin/mastodon_restart.sh diff --git a/miscellaneous/bash/mastodon_status-check.sh b/miscellaneous/bash/bin/mastodon_status-check.sh similarity index 100% rename from miscellaneous/bash/mastodon_status-check.sh rename to miscellaneous/bash/bin/mastodon_status-check.sh diff --git a/miscellaneous/bash/migrationtoblock.sh b/miscellaneous/bash/bin/migrationtoblock.sh similarity index 100% rename from miscellaneous/bash/migrationtoblock.sh rename to miscellaneous/bash/bin/migrationtoblock.sh diff --git a/miscellaneous/bash/p1.sh b/miscellaneous/bash/bin/p1.sh similarity index 100% rename from miscellaneous/bash/p1.sh rename to miscellaneous/bash/bin/p1.sh diff --git a/miscellaneous/bash/p2.sh b/miscellaneous/bash/bin/p2.sh similarity index 100% rename from miscellaneous/bash/p2.sh rename to miscellaneous/bash/bin/p2.sh diff --git a/miscellaneous/bash/perms.sh b/miscellaneous/bash/bin/perms.sh similarity index 100% rename from miscellaneous/bash/perms.sh rename to miscellaneous/bash/bin/perms.sh diff --git a/miscellaneous/bash/pull_health_everywhere_ntp.sh b/miscellaneous/bash/bin/pull_health_everywhere_ntp.sh similarity index 100% rename from miscellaneous/bash/pull_health_everywhere_ntp.sh rename to miscellaneous/bash/bin/pull_health_everywhere_ntp.sh diff --git a/miscellaneous/bash/restore.sh b/miscellaneous/bash/bin/restore.sh similarity index 100% rename from miscellaneous/bash/restore.sh rename to miscellaneous/bash/bin/restore.sh diff --git a/miscellaneous/bash/retention.sh b/miscellaneous/bash/bin/retention.sh similarity index 100% rename from miscellaneous/bash/retention.sh rename to miscellaneous/bash/bin/retention.sh diff --git a/miscellaneous/bash/rsync_zfs_sync_helper.sh b/miscellaneous/bash/bin/rsync_zfs_sync_helper.sh similarity index 100% rename from miscellaneous/bash/rsync_zfs_sync_helper.sh rename to miscellaneous/bash/bin/rsync_zfs_sync_helper.sh diff --git a/miscellaneous/bash/run_prune_from_krang.sh b/miscellaneous/bash/bin/run_prune_from_krang.sh similarity index 100% rename from miscellaneous/bash/run_prune_from_krang.sh rename to miscellaneous/bash/bin/run_prune_from_krang.sh diff --git a/miscellaneous/bash/startemup.sh b/miscellaneous/bash/bin/startemup.sh similarity index 100% rename from miscellaneous/bash/startemup.sh rename to miscellaneous/bash/bin/startemup.sh diff --git a/miscellaneous/bash/sync-to-vault.sh b/miscellaneous/bash/bin/sync-to-vault.sh similarity index 100% rename from miscellaneous/bash/sync-to-vault.sh rename to miscellaneous/bash/bin/sync-to-vault.sh diff --git a/miscellaneous/bash/sync-trigger.sh b/miscellaneous/bash/bin/sync-trigger.sh similarity index 100% rename from miscellaneous/bash/sync-trigger.sh rename to miscellaneous/bash/bin/sync-trigger.sh diff --git a/miscellaneous/bash/sync.sh b/miscellaneous/bash/bin/sync.sh similarity index 100% rename from miscellaneous/bash/sync.sh rename to miscellaneous/bash/bin/sync.sh diff --git a/miscellaneous/bash/tothebank.sh b/miscellaneous/bash/bin/tothebank.sh similarity index 100% rename from miscellaneous/bash/tothebank.sh rename to miscellaneous/bash/bin/tothebank.sh diff --git a/miscellaneous/bash/upgrade.sh b/miscellaneous/bash/bin/upgrade.sh similarity index 100% rename from miscellaneous/bash/upgrade.sh rename to miscellaneous/bash/bin/upgrade.sh diff --git a/miscellaneous/bash/validate_zfs.sh b/miscellaneous/bash/bin/validate_zfs.sh similarity index 100% rename from miscellaneous/bash/validate_zfs.sh rename to miscellaneous/bash/bin/validate_zfs.sh diff --git a/miscellaneous/bash/venv-backup-script.sh b/miscellaneous/bash/bin/venv-backup-script.sh similarity index 100% rename from miscellaneous/bash/venv-backup-script.sh rename to miscellaneous/bash/bin/venv-backup-script.sh diff --git a/miscellaneous/bash/verify_minio.sh b/miscellaneous/bash/bin/verify_minio.sh similarity index 100% rename from miscellaneous/bash/verify_minio.sh rename to miscellaneous/bash/bin/verify_minio.sh diff --git a/miscellaneous/bash/bin/verifypxe.sh b/miscellaneous/bash/bin/verifypxe.sh new file mode 100755 index 0000000..203292b --- /dev/null +++ b/miscellaneous/bash/bin/verifypxe.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# === Genesis PXE Verifier === +# Verifies iPXE script and image accessibility over Tailscale + +TAILSCALE_IP="100.113.50.65" +VM_NAME="$1" + +if [[ -z "$VM_NAME" ]]; then + echo "Usage: $0 " + exit 1 +fi + +IPXE_URL="http://100.113.50.65:3000/ipxe/${VM_NAME}.ipxe" + + +echo "πŸ”Ž Checking iPXE script at $IPXE_URL ..." +if ! curl -fsSL "$IPXE_URL" -o /tmp/${VM_NAME}.ipxe; then + echo "❌ Failed to fetch iPXE script: $IPXE_URL" + exit 2 +fi +echo "βœ… iPXE script retrieved." + +# Extract kernel and initrd lines +KERNEL_URL=$(grep '^kernel ' /tmp/${VM_NAME}.ipxe | awk '{print $2}') +INITRD_URL=$(grep '^initrd ' /tmp/${VM_NAME}.ipxe | awk '{print $2}') + +if [[ -z "$KERNEL_URL" || -z "$INITRD_URL" ]]; then + echo "❌ Could not parse kernel/initrd URLs from iPXE script." + exit 3 +fi + +echo "πŸ” Kernel URL: $KERNEL_URL" +echo "πŸ” Initrd URL: $INITRD_URL" + +echo "πŸ”Ž Verifying kernel URL ..." +if ! curl -fsI "$KERNEL_URL" >/dev/null; then + echo "❌ Kernel file not accessible." + exit 4 +fi +echo "βœ… Kernel accessible." + +echo "πŸ”Ž Verifying initrd URL ..." +if ! curl -fsI "$INITRD_URL" >/dev/null; then + echo "❌ Initrd file not accessible." + exit 5 +fi +echo "βœ… Initrd accessible." + +echo "πŸŽ‰ PXE verification successful for VM: $VM_NAME" +echo "πŸš€ Ready to launch boot from $IPXE_URL" + +# Optional: Telegram notify (requires telegram-send config) +if command -v telegram-send &>/dev/null; then + telegram-send "βœ… PXE verify passed for *${VM_NAME}*. +Netboot source: \`${IPXE_URL}\` +Kernel: \`${KERNEL_URL##*/}\` +Initrd: \`${INITRD_URL##*/}\` +Ready to launch via Proxmox." --parse-mode markdown +fi + +exit 0 diff --git a/miscellaneous/bash/watchdog.sh b/miscellaneous/bash/bin/watchdog.sh similarity index 100% rename from miscellaneous/bash/watchdog.sh rename to miscellaneous/bash/bin/watchdog.sh diff --git a/miscellaneous/bash/zfs_bootstrap.sh b/miscellaneous/bash/bin/zfs_bootstrap.sh similarity index 100% rename from miscellaneous/bash/zfs_bootstrap.sh rename to miscellaneous/bash/bin/zfs_bootstrap.sh diff --git a/miscellaneous/bash/docs/backup.md b/miscellaneous/bash/docs/backup.md new file mode 100644 index 0000000..474fa18 --- /dev/null +++ b/miscellaneous/bash/docs/backup.md @@ -0,0 +1,15 @@ +--- +title: backup.sh +categories: [backup] +source: bin/backup.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# backup.sh + +#!/bin/bash +Configuration +Ensure the destination directory exists +Backup Mastodon files + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/clean_media.md b/miscellaneous/bash/docs/clean_media.md new file mode 100644 index 0000000..1f935f7 --- /dev/null +++ b/miscellaneous/bash/docs/clean_media.md @@ -0,0 +1,12 @@ +--- +title: clean_media.sh +categories: [uncategorized] +source: bin/clean_media.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# clean_media.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/clean_orphans.md b/miscellaneous/bash/docs/clean_orphans.md new file mode 100644 index 0000000..c90efee --- /dev/null +++ b/miscellaneous/bash/docs/clean_orphans.md @@ -0,0 +1,12 @@ +--- +title: clean_orphans.sh +categories: [uncategorized] +source: bin/clean_orphans.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# clean_orphans.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/clean_previewcards.md b/miscellaneous/bash/docs/clean_previewcards.md new file mode 100644 index 0000000..6b3bbc5 --- /dev/null +++ b/miscellaneous/bash/docs/clean_previewcards.md @@ -0,0 +1,12 @@ +--- +title: clean_previewcards.sh +categories: [uncategorized] +source: bin/clean_previewcards.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# clean_previewcards.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/copydunkadunk.md b/miscellaneous/bash/docs/copydunkadunk.md new file mode 100644 index 0000000..8383a45 --- /dev/null +++ b/miscellaneous/bash/docs/copydunkadunk.md @@ -0,0 +1,14 @@ +--- +title: copydunkadunk.sh +categories: [uncategorized] +source: bin/copydunkadunk.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# copydunkadunk.sh + +#!/bin/bash +Base path where your current datasets are mounted +Mapping of underscore-named folders to dash-named equivalents + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/dasystemisdownyo.md b/miscellaneous/bash/docs/dasystemisdownyo.md new file mode 100644 index 0000000..98bb828 --- /dev/null +++ b/miscellaneous/bash/docs/dasystemisdownyo.md @@ -0,0 +1,14 @@ +--- +title: dasystemisdownyo.sh +categories: [uncategorized] +source: bin/dasystemisdownyo.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# dasystemisdownyo.sh + +#!/bin/bash +#da system is down yo +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/db2_backup.md b/miscellaneous/bash/docs/db2_backup.md new file mode 100644 index 0000000..d1d412d --- /dev/null +++ b/miscellaneous/bash/docs/db2_backup.md @@ -0,0 +1,23 @@ +--- +title: db2_backup.sh +categories: [backup] +source: bin/db2_backup.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# db2_backup.sh + +#!/bin/bash +# +Script Name: db2_zfs_backup.sh +Description: Creates a raw base backup of PostgreSQL on zcluster.technodrome2 using pg_basebackup in directory mode. + Transfers the backup to The Vault’s ZFS dataset and snapshots it for long-term retention. +Requirements: pg_basebackup, SSH access, rclone or rsync, ZFS dataset available at destination +Usage: ./db2_zfs_backup.sh +Author: Doc @ Genesis Ops +Date: 2025-05-12 +# +### CONFIGURATION ### +Remote source rclone config (optional) + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/deldirectories.md b/miscellaneous/bash/docs/deldirectories.md new file mode 100644 index 0000000..b6cdeea --- /dev/null +++ b/miscellaneous/bash/docs/deldirectories.md @@ -0,0 +1,12 @@ +--- +title: deldirectories.sh +categories: [uncategorized] +source: bin/deldirectories.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# deldirectories.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/disk_mitigator.md b/miscellaneous/bash/docs/disk_mitigator.md new file mode 100644 index 0000000..6de40c6 --- /dev/null +++ b/miscellaneous/bash/docs/disk_mitigator.md @@ -0,0 +1,16 @@ +--- +title: disk_mitigator.sh +categories: [disk] +source: bin/disk_mitigator.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# disk_mitigator.sh + +#!/bin/bash +=== Prompt for Target === +=== Alert Config (local alerts) === +=== Remote Disk Check + Cleanup Script === +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/do_the_needful.md b/miscellaneous/bash/docs/do_the_needful.md new file mode 100644 index 0000000..1bb8796 --- /dev/null +++ b/miscellaneous/bash/docs/do_the_needful.md @@ -0,0 +1,15 @@ +--- +title: do_the_needful.sh +categories: [uncategorized] +source: bin/do_the_needful.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# do_the_needful.sh + +#!/bin/bash +=== CONFIG === +=== Telegram Config === +1. Tune swappiness + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/dotheneedfuleverywhere.md b/miscellaneous/bash/docs/dotheneedfuleverywhere.md new file mode 100644 index 0000000..ed80eca --- /dev/null +++ b/miscellaneous/bash/docs/dotheneedfuleverywhere.md @@ -0,0 +1,13 @@ +--- +title: dotheneedfuleverywhere.sh +categories: [uncategorized] +source: bin/dotheneedfuleverywhere.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# dotheneedfuleverywhere.sh + +#!/bin/bash +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/dr_mirror_to_linode.md b/miscellaneous/bash/docs/dr_mirror_to_linode.md new file mode 100644 index 0000000..41253a0 --- /dev/null +++ b/miscellaneous/bash/docs/dr_mirror_to_linode.md @@ -0,0 +1,15 @@ +--- +title: dr_mirror_to_linode.sh +categories: [dr] +source: bin/dr_mirror_to_linode.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# dr_mirror_to_linode.sh + +#!/bin/bash +=== CONFIG === +=== SETUP === +=== START LOGGING === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/dr_telegram_alert.md b/miscellaneous/bash/docs/dr_telegram_alert.md new file mode 100644 index 0000000..17a37d2 --- /dev/null +++ b/miscellaneous/bash/docs/dr_telegram_alert.md @@ -0,0 +1,15 @@ +--- +title: dr_telegram_alert.sh +categories: [alert, dr] +source: bin/dr_telegram_alert.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# dr_telegram_alert.sh + +#!/bin/bash +Telegram Bot Token and Chat ID +Function to send Telegram message +Check if it's the first of the month and send a reminder + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/fix_queue.md b/miscellaneous/bash/docs/fix_queue.md new file mode 100644 index 0000000..f74171d --- /dev/null +++ b/miscellaneous/bash/docs/fix_queue.md @@ -0,0 +1,13 @@ +--- +title: fix_queue.sh +categories: [fix] +source: bin/fix_queue.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# fix_queue.sh + +#!/bin/bash +===== CONFIG ===== + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/fix_queue2.md b/miscellaneous/bash/docs/fix_queue2.md new file mode 100644 index 0000000..40e8399 --- /dev/null +++ b/miscellaneous/bash/docs/fix_queue2.md @@ -0,0 +1,15 @@ +--- +title: fix_queue2.sh +categories: [fix] +source: bin/fix_queue2.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# fix_queue2.sh + +#!/bin/bash +===== CONFIG ===== +Set full path for bundle +Set RAILS_ENV for the script execution + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/fix_queue3.md b/miscellaneous/bash/docs/fix_queue3.md new file mode 100644 index 0000000..b71418a --- /dev/null +++ b/miscellaneous/bash/docs/fix_queue3.md @@ -0,0 +1,14 @@ +--- +title: fix_queue3.sh +categories: [fix] +source: bin/fix_queue3.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# fix_queue3.sh + +#!/bin/bash +===== CONFIG ===== +Set full path for bundle + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/fixsudoerseverywhere.md b/miscellaneous/bash/docs/fixsudoerseverywhere.md new file mode 100644 index 0000000..ba3502e --- /dev/null +++ b/miscellaneous/bash/docs/fixsudoerseverywhere.md @@ -0,0 +1,14 @@ +--- +title: fixsudoerseverywhere.sh +categories: [fix] +source: bin/fixsudoerseverywhere.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# fixsudoerseverywhere.sh + +#!/bin/bash +=== CONFIG === +=== Execution === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/freezer.md b/miscellaneous/bash/docs/freezer.md new file mode 100644 index 0000000..219cf76 --- /dev/null +++ b/miscellaneous/bash/docs/freezer.md @@ -0,0 +1,13 @@ +--- +title: freezer.sh +categories: [uncategorized] +source: bin/freezer.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# freezer.sh + +#!/bin/bash +Find all venvs, freeze their packages to requirements.txt + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/freezermove.md b/miscellaneous/bash/docs/freezermove.md new file mode 100644 index 0000000..3e86217 --- /dev/null +++ b/miscellaneous/bash/docs/freezermove.md @@ -0,0 +1,12 @@ +--- +title: freezermove.sh +categories: [uncategorized] +source: bin/freezermove.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# freezermove.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/genesis_check.md b/miscellaneous/bash/docs/genesis_check.md new file mode 100644 index 0000000..4864d25 --- /dev/null +++ b/miscellaneous/bash/docs/genesis_check.md @@ -0,0 +1,12 @@ +--- +title: genesis_check.sh +categories: [uncategorized] +source: bin/genesis_check.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# genesis_check.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/genesis_sync_progress.md b/miscellaneous/bash/docs/genesis_sync_progress.md new file mode 100644 index 0000000..48c873d --- /dev/null +++ b/miscellaneous/bash/docs/genesis_sync_progress.md @@ -0,0 +1,13 @@ +--- +title: genesis_sync_progress.sh +categories: [sync] +source: bin/genesis_sync_progress.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# genesis_sync_progress.sh + +#!/bin/bash +GenesisSync Progress Tracker - No hangs, no nonsense + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/get_telegram_id.md b/miscellaneous/bash/docs/get_telegram_id.md new file mode 100644 index 0000000..408ba06 --- /dev/null +++ b/miscellaneous/bash/docs/get_telegram_id.md @@ -0,0 +1,12 @@ +--- +title: get_telegram_id.sh +categories: [uncategorized] +source: bin/get_telegram_id.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# get_telegram_id.sh + +#!/bin/bash + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/giteapushv3.md b/miscellaneous/bash/docs/giteapushv3.md new file mode 100644 index 0000000..cc50de0 --- /dev/null +++ b/miscellaneous/bash/docs/giteapushv3.md @@ -0,0 +1,18 @@ +--- +title: giteapushv3.sh +categories: [uncategorized] +source: bin/giteapushv3.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# giteapushv3.sh + +#!/bin/bash +Genesis Radio Git Auto-Push +With Auto-Retry if Push Fails +Move to the top of the git repo automatically +Log the current location +Stage all changes (new, modified, deleted) +Check if there's anything to commit + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/hardenit.md b/miscellaneous/bash/docs/hardenit.md new file mode 100644 index 0000000..221062f --- /dev/null +++ b/miscellaneous/bash/docs/hardenit.md @@ -0,0 +1,16 @@ +--- +title: hardenit.sh +categories: [uncategorized] +source: bin/hardenit.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# hardenit.sh + +#!/bin/bash +harden_pyapps_box.sh - Secure the Genesis pyapps VM +Run as root or with sudo +1. Lock unused system accounts +2. Enforce password policy for doc + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/kodakmoment.md b/miscellaneous/bash/docs/kodakmoment.md new file mode 100644 index 0000000..35fbc28 --- /dev/null +++ b/miscellaneous/bash/docs/kodakmoment.md @@ -0,0 +1,15 @@ +--- +title: kodakmoment.sh +categories: [uncategorized] +source: bin/kodakmoment.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# kodakmoment.sh + +#!/usr/bin/env bash +### CONFIG ### +Timestamp-based vars (only when running a snapshot) +--dry-run support + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/kodakmomentproxmox.md b/miscellaneous/bash/docs/kodakmomentproxmox.md new file mode 100644 index 0000000..0b4c68c --- /dev/null +++ b/miscellaneous/bash/docs/kodakmomentproxmox.md @@ -0,0 +1,14 @@ +--- +title: kodakmomentproxmox.sh +categories: [uncategorized] +source: bin/kodakmomentproxmox.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# kodakmomentproxmox.sh + +#!/usr/bin/env bash +### CONFIG ### +Ensure base destination directory exists + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/krang_backup.md b/miscellaneous/bash/docs/krang_backup.md new file mode 100644 index 0000000..b4d0896 --- /dev/null +++ b/miscellaneous/bash/docs/krang_backup.md @@ -0,0 +1,14 @@ +--- +title: krang_backup.sh +categories: [backup] +source: bin/krang_backup.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# krang_backup.sh + +#!/bin/bash +Source directories to back up +Destination directories on the vault + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/krang_modular_health.md b/miscellaneous/bash/docs/krang_modular_health.md new file mode 100644 index 0000000..7f7061e --- /dev/null +++ b/miscellaneous/bash/docs/krang_modular_health.md @@ -0,0 +1,14 @@ +--- +title: krang_modular_health.sh +categories: [uncategorized] +source: bin/krang_modular_health.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# krang_modular_health.sh + +#!/bin/bash +=== CONFIG === +Thresholds + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/malips.md b/miscellaneous/bash/docs/malips.md new file mode 100644 index 0000000..7042e31 --- /dev/null +++ b/miscellaneous/bash/docs/malips.md @@ -0,0 +1,15 @@ +--- +title: malips.sh +categories: [uncategorized] +source: bin/malips.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# malips.sh + +#!/bin/bash +Path to Snort's alert log (snort.alert.fast) +Database connection details +Function to insert blocked IP into the PostgreSQL database + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/mastodon_restart.md b/miscellaneous/bash/docs/mastodon_restart.md new file mode 100644 index 0000000..373578a --- /dev/null +++ b/miscellaneous/bash/docs/mastodon_restart.md @@ -0,0 +1,13 @@ +--- +title: mastodon_restart.sh +categories: [mastodon] +source: bin/mastodon_restart.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# mastodon_restart.sh + +#!/bin/bash +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/mastodon_status-check.md b/miscellaneous/bash/docs/mastodon_status-check.md new file mode 100644 index 0000000..5cc116b --- /dev/null +++ b/miscellaneous/bash/docs/mastodon_status-check.md @@ -0,0 +1,13 @@ +--- +title: mastodon_status-check.sh +categories: [mastodon] +source: bin/mastodon_status-check.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# mastodon_status-check.sh + +#!/bin/bash +Load token from ~/.mastodon-token or environment + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/migrationtoblock.md b/miscellaneous/bash/docs/migrationtoblock.md new file mode 100644 index 0000000..f96dd14 --- /dev/null +++ b/miscellaneous/bash/docs/migrationtoblock.md @@ -0,0 +1,13 @@ +--- +title: migrationtoblock.sh +categories: [uncategorized] +source: bin/migrationtoblock.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# migrationtoblock.sh + +#!/bin/bash +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/p1.md b/miscellaneous/bash/docs/p1.md new file mode 100644 index 0000000..a0425aa --- /dev/null +++ b/miscellaneous/bash/docs/p1.md @@ -0,0 +1,14 @@ +--- +title: p1.sh +categories: [uncategorized] +source: bin/p1.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# p1.sh + +#!/bin/bash +Configuration +Initialize the log file + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/p2.md b/miscellaneous/bash/docs/p2.md new file mode 100644 index 0000000..9434b6e --- /dev/null +++ b/miscellaneous/bash/docs/p2.md @@ -0,0 +1,14 @@ +--- +title: p2.sh +categories: [uncategorized] +source: bin/p2.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# p2.sh + +#!/bin/bash +Function to print dry-run actions and log them +Configuration + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/perms.md b/miscellaneous/bash/docs/perms.md new file mode 100644 index 0000000..cdbdce4 --- /dev/null +++ b/miscellaneous/bash/docs/perms.md @@ -0,0 +1,13 @@ +--- +title: perms.sh +categories: [uncategorized] +source: bin/perms.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# perms.sh + +#!/bin/bash +Safe and resumable chmod script with progress output + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/pull_health_everywhere_ntp.md b/miscellaneous/bash/docs/pull_health_everywhere_ntp.md new file mode 100644 index 0000000..17a541f --- /dev/null +++ b/miscellaneous/bash/docs/pull_health_everywhere_ntp.md @@ -0,0 +1,14 @@ +--- +title: pull_health_everywhere_ntp.sh +categories: [uncategorized] +source: bin/pull_health_everywhere_ntp.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# pull_health_everywhere_ntp.sh + +#!/bin/bash +=== CONFIG === +Thresholds + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/restore.md b/miscellaneous/bash/docs/restore.md new file mode 100644 index 0000000..6c6aefd --- /dev/null +++ b/miscellaneous/bash/docs/restore.md @@ -0,0 +1,15 @@ +--- +title: restore.sh +categories: [restore] +source: bin/restore.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# restore.sh + +#!/bin/bash +Configuration +Create the local restore directory if it doesn't exist +Find the latest backup file on the remote server + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/retention.md b/miscellaneous/bash/docs/retention.md new file mode 100644 index 0000000..6497822 --- /dev/null +++ b/miscellaneous/bash/docs/retention.md @@ -0,0 +1,15 @@ +--- +title: retention.sh +categories: [uncategorized] +source: bin/retention.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# retention.sh + +#!/bin/bash +Log start of run +Init counters +Traverse all subfolders + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/rsync_zfs_sync_helper.md b/miscellaneous/bash/docs/rsync_zfs_sync_helper.md new file mode 100644 index 0000000..259717d --- /dev/null +++ b/miscellaneous/bash/docs/rsync_zfs_sync_helper.md @@ -0,0 +1,16 @@ +--- +title: rsync_zfs_sync_helper.sh +categories: [sync, zfs] +source: bin/rsync_zfs_sync_helper.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# rsync_zfs_sync_helper.sh + +#!/bin/bash +sync_to_vault.sh +Rsync + ZFS sanity tool with built-in slash wisdom +=== CONFIG === +=== USAGE === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/run_prune_from_krang.md b/miscellaneous/bash/docs/run_prune_from_krang.md new file mode 100644 index 0000000..c15409c --- /dev/null +++ b/miscellaneous/bash/docs/run_prune_from_krang.md @@ -0,0 +1,13 @@ +--- +title: run_prune_from_krang.sh +categories: [uncategorized] +source: bin/run_prune_from_krang.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# run_prune_from_krang.sh + +#!/bin/bash +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/startemup.md b/miscellaneous/bash/docs/startemup.md new file mode 100644 index 0000000..2106692 --- /dev/null +++ b/miscellaneous/bash/docs/startemup.md @@ -0,0 +1,13 @@ +--- +title: startemup.sh +categories: [uncategorized] +source: bin/startemup.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# startemup.sh + +#!/usr/bin/env bash +Launches Python virtual environments in separate screen sessions or manages their status + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/sync-to-vault.md b/miscellaneous/bash/docs/sync-to-vault.md new file mode 100644 index 0000000..b424a66 --- /dev/null +++ b/miscellaneous/bash/docs/sync-to-vault.md @@ -0,0 +1,13 @@ +--- +title: sync-to-vault.sh +categories: [sync] +source: bin/sync-to-vault.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# sync-to-vault.sh + +#!/bin/bash +=== CONFIG === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/sync-trigger.md b/miscellaneous/bash/docs/sync-trigger.md new file mode 100644 index 0000000..84e0673 --- /dev/null +++ b/miscellaneous/bash/docs/sync-trigger.md @@ -0,0 +1,16 @@ +--- +title: sync-trigger.sh +categories: [sync] +source: bin/sync-trigger.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# sync-trigger.sh + +#!/bin/bash +=== CONFIG === +=== Mastodon Alert Settings === +=== Telegram Settings === +=== Execution === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/sync.md b/miscellaneous/bash/docs/sync.md new file mode 100644 index 0000000..ab42d11 --- /dev/null +++ b/miscellaneous/bash/docs/sync.md @@ -0,0 +1,13 @@ +--- +title: sync.sh +categories: [sync] +source: bin/sync.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# sync.sh + +#!/bin/bash +Setup alias (even if it already exists) + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/tothebank.md b/miscellaneous/bash/docs/tothebank.md new file mode 100644 index 0000000..843b07e --- /dev/null +++ b/miscellaneous/bash/docs/tothebank.md @@ -0,0 +1,15 @@ +--- +title: tothebank.sh +categories: [uncategorized] +source: bin/tothebank.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# tothebank.sh + +#!/bin/bash +Mastodon Media Audit: Find orphaned .part.* dirs & estimate space wasted +For mounted MinIO (e.g., /assets/minio-data/mastodon) +Find all part.1 or similar that are actually directories + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/upgrade.md b/miscellaneous/bash/docs/upgrade.md new file mode 100644 index 0000000..38a80ff --- /dev/null +++ b/miscellaneous/bash/docs/upgrade.md @@ -0,0 +1,13 @@ +--- +title: upgrade.sh +categories: [uncategorized] +source: bin/upgrade.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# upgrade.sh + +#!/bin/bash +---- CONFIGURATION ---- + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/validate_zfs.md b/miscellaneous/bash/docs/validate_zfs.md new file mode 100644 index 0000000..3ba7b00 --- /dev/null +++ b/miscellaneous/bash/docs/validate_zfs.md @@ -0,0 +1,14 @@ +--- +title: validate_zfs.sh +categories: [zfs] +source: bin/validate_zfs.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# validate_zfs.sh + +#!/bin/bash +CONFIG +COLORS + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/venv-backup-script.md b/miscellaneous/bash/docs/venv-backup-script.md new file mode 100644 index 0000000..e06cc44 --- /dev/null +++ b/miscellaneous/bash/docs/venv-backup-script.md @@ -0,0 +1,21 @@ +--- +title: venv-backup-script.sh +categories: [backup] +source: bin/venv-backup-script.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# venv-backup-script.sh + +#!/usr/bin/env bash +### Configuration ### +Setting the root directory for virtual environments +Define the backup directory where backups will be stored locally +Define the retention period for local backups in days. Older backups will be deleted. +Remote settings for syncing backups to a remote server +Define the SSH user for remote access +Define the remote host (the server where backups will be stored) +Define the path on the remote server where the backups will be stored +### Derived ### + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/verify_minio.md b/miscellaneous/bash/docs/verify_minio.md new file mode 100644 index 0000000..5154528 --- /dev/null +++ b/miscellaneous/bash/docs/verify_minio.md @@ -0,0 +1,13 @@ +--- +title: verify_minio.sh +categories: [minio, verify] +source: bin/verify_minio.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# verify_minio.sh + +#!/bin/bash +CONFIG + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/verifypxe.md b/miscellaneous/bash/docs/verifypxe.md new file mode 100644 index 0000000..470ae9c --- /dev/null +++ b/miscellaneous/bash/docs/verifypxe.md @@ -0,0 +1,14 @@ +--- +title: verifypxe.sh +categories: [verify] +source: bin/verifypxe.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# verifypxe.sh + +#!/bin/bash +=== Genesis PXE Verifier === +Verifies iPXE script and image accessibility over Tailscale + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/watchdog.md b/miscellaneous/bash/docs/watchdog.md new file mode 100644 index 0000000..ff94424 --- /dev/null +++ b/miscellaneous/bash/docs/watchdog.md @@ -0,0 +1,14 @@ +--- +title: watchdog.sh +categories: [uncategorized] +source: bin/watchdog.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# watchdog.sh + +#!/bin/bash +=== CONFIG === +=== FIND TARGET PID === + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/docs/zfs_bootstrap.md b/miscellaneous/bash/docs/zfs_bootstrap.md new file mode 100644 index 0000000..4980c45 --- /dev/null +++ b/miscellaneous/bash/docs/zfs_bootstrap.md @@ -0,0 +1,13 @@ +--- +title: zfs_bootstrap.sh +categories: [zfs] +source: bin/zfs_bootstrap.sh +generated: 2025-05-22T08:38:59-04:00 +--- + +# zfs_bootstrap.sh + +#!/bin/bash +CONFIGURATION + +_Auto-generated from source script on Thu May 22 08:38:59 AM EDT 2025_ diff --git a/miscellaneous/bash/home/doc/genesis-tools/miscellaneous/bash/setup_install.log b/miscellaneous/bash/home/doc/genesis-tools/miscellaneous/bash/setup_install.log new file mode 100644 index 0000000..7c2e6c7 --- /dev/null +++ b/miscellaneous/bash/home/doc/genesis-tools/miscellaneous/bash/setup_install.log @@ -0,0 +1 @@ +[INFO] Setup run at Thu May 22 08:30:39 AM EDT 2025 diff --git a/miscellaneous/bash/import_src_flat.sh b/miscellaneous/bash/import_src_flat.sh new file mode 100755 index 0000000..0daf047 --- /dev/null +++ b/miscellaneous/bash/import_src_flat.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# import_src_flat.sh +# Moves flat scripts/docs in src/ into bin/, archive/, or docs/ subfolders + +BASE="/home/doc/genesis-tools/miscellaneous/bash/src" + +# Ensure subfolders exist +mkdir -p "$BASE/bin" "$BASE/archive" "$BASE/docs" + +# Move known bin scripts from src root +for script in \ + backup.sh clean_media.sh clean_orphans.sh clean_previewcards.sh \ + copydunkadunk.sh dasystemisdownyo.sh db2_backup.sh deldirectories.sh \ + disk_mitigator.sh dotheneedfuleverywhere.sh do_the_needful.sh \ + dr_mirror_to_linode.sh dr_telegram_alert.sh fix_queue.sh fix_queue2.sh fix_queue3.sh \ + fixsudoerseverywhere.sh freezermove.sh freezer.sh genesis_check.sh \ + genesis_sync_progress.sh get_telegram_id.sh giteapushv3.sh \ + hardenit.sh kodakmoment.sh kodakmomentproxmox.sh krang_backup.sh \ + krang_modular_health.sh malips.sh mastodon_restart.sh mastodon_status-check.sh \ + migrationtoblock.sh p1.sh p2.sh perms.sh pull_health_everywhere \ + pull_health_everywhere_ntp.sh restore.sh retention.sh \ + rsync_zfs_sync_helper.sh run_prune_from_krang.sh startemup.sh \ + sync.sh sync-to-vault.sh sync-trigger.sh tothebank.sh upgrade.sh \ + validate_zfs.sh venv-backup-script.sh verify_minio.sh verifypxe.sh watchdog.sh \ + zfs_bootstrap.sh; do + if [ -f "$BASE/$script" ]; then + mv -v "$BASE/$script" "$BASE/bin/" + fi +done + +# Move known archive scripts +mv -v "$BASE/krang_health_report.sh" "$BASE/archive/" 2>/dev/null || true + +# Move docs +mv -v "$BASE/alerting.md" "$BASE/docs/" 2>/dev/null || true +mv -v "$BASE/README.md" "$BASE/" 2>/dev/null || true + +exit 0 diff --git a/miscellaneous/bash/list_installed_tools.sh b/miscellaneous/bash/list_installed_tools.sh new file mode 100755 index 0000000..d7f2f10 --- /dev/null +++ b/miscellaneous/bash/list_installed_tools.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# list_installed_tools.sh +# Summarizes the most recent Genesis tools installation log + +LOG_FILE="$(dirname "$0")/setup_install.log" + +if [[ ! -f "$LOG_FILE" ]]; then + echo "No installation log found at \$LOG_FILE" + exit 1 +fi + +echo "πŸ“‹ Installed Genesis Tools (from \$LOG_FILE):" +echo "--------------------------------------------------" +grep "\[INSTALL\]" "$LOG_FILE" | sed 's/\[INSTALL\] //' | sort diff --git a/miscellaneous/bash/setup_genesis_tools.sh b/miscellaneous/bash/setup_genesis_tools.sh new file mode 100755 index 0000000..34a03e9 --- /dev/null +++ b/miscellaneous/bash/setup_genesis_tools.sh @@ -0,0 +1,140 @@ +#!/bin/bash +# setup_genesis_tools.sh +# Creates the Genesis tools directory structure, installs scripts from src/*, +# auto-organizes loose src/ files into subfolders, +# logs what was installed, and optionally sets timestamps. + +set -e + +# Auto-organize any flat files in src/ into proper subfolders +TOOL_DIR="/home/doc/genesis-tools/miscellaneous/bash" +IMPORT_SCRIPT="$TOOL_DIR/import_src_flat.sh" + +# Always regenerate the import script with latest logic +cat > "$IMPORT_SCRIPT" <<'EOS' +#!/bin/bash +# import_src_flat.sh +# Moves flat scripts/docs in src/ into bin/, archive/, or docs/ subfolders + +BASE="/home/doc/genesis-tools/miscellaneous/bash/src" + +# Ensure subfolders exist +mkdir -p "$BASE/bin" "$BASE/archive" "$BASE/docs" + +# Move known bin scripts from src root +for script in \ + backup.sh clean_media.sh clean_orphans.sh clean_previewcards.sh \ + copydunkadunk.sh dasystemisdownyo.sh db2_backup.sh deldirectories.sh \ + disk_mitigator.sh dotheneedfuleverywhere.sh do_the_needful.sh \ + dr_mirror_to_linode.sh dr_telegram_alert.sh fix_queue.sh fix_queue2.sh fix_queue3.sh \ + fixsudoerseverywhere.sh freezermove.sh freezer.sh genesis_check.sh \ + genesis_sync_progress.sh get_telegram_id.sh giteapushv3.sh \ + hardenit.sh kodakmoment.sh kodakmomentproxmox.sh krang_backup.sh \ + krang_modular_health.sh malips.sh mastodon_restart.sh mastodon_status-check.sh \ + migrationtoblock.sh p1.sh p2.sh perms.sh pull_health_everywhere \ + pull_health_everywhere_ntp.sh restore.sh retention.sh \ + rsync_zfs_sync_helper.sh run_prune_from_krang.sh startemup.sh \ + sync.sh sync-to-vault.sh sync-trigger.sh tothebank.sh upgrade.sh \ + validate_zfs.sh venv-backup-script.sh verify_minio.sh verifypxe.sh watchdog.sh \ + zfs_bootstrap.sh; do + if [ -f "$BASE/$script" ]; then + mv -v "$BASE/$script" "$BASE/bin/" + fi +done + +# Move known archive scripts +mv -v "$BASE/krang_health_report.sh" "$BASE/archive/" 2>/dev/null || true + +# Move docs +mv -v "$BASE/alerting.md" "$BASE/docs/" 2>/dev/null || true +mv -v "$BASE/README.md" "$BASE/" 2>/dev/null || true + +exit 0 +EOS +chmod +x "$IMPORT_SCRIPT" +bash "$IMPORT_SCRIPT" + +# Define core tool paths +TOOL_DIR="/home/doc/genesis-tools/miscellaneous/bash" +SRC_DIR="$TOOL_DIR/src" +BIN_DIR="$TOOL_DIR/bin" +DOC_DIR="$TOOL_DIR/docs" +CONFIG_DIR="$TOOL_DIR/config" +LIB_DIR="$TOOL_DIR/lib" +ARCHIVE_DIR="$TOOL_DIR/archive" +LOG_FILE="$TOOL_DIR/setup_install.log" + +mkdir -p "$BIN_DIR" "$DOC_DIR" "$CONFIG_DIR" "$LIB_DIR" "$ARCHIVE_DIR" +echo "[INFO] Setup run at $(date)" > "$LOG_FILE" + +cp "$SRC_DIR/README.md" "$TOOL_DIR/README.md" +echo "[INSTALL] README.md copied to $TOOL_DIR" >> "$LOG_FILE" + +# Copy scripts and log actions + +echo "[*] Installing bin scripts..." +find "$SRC_DIR/bin" -type f -name "*.sh" | while read -r script; do + echo " β†’ Installing $(basename "$script") to bin/" + install -m 755 "$script" "$BIN_DIR/" + echo "[INSTALL] $(basename "$script") installed to bin/" >> "$LOG_FILE" +done + +echo "[*] Installing archive scripts..." +find "$SRC_DIR/archive" -type f -name "*.sh" | while read -r script; do + echo " β†’ Installing $(basename "$script") to archive/" + install -m 755 "$script" "$ARCHIVE_DIR/" + echo "[INSTALL] $(basename "$script") installed to archive/" >> "$LOG_FILE" +done + +echo "[*] Installing documentation..." +find "$SRC_DIR/docs" -type f -name "*.md" | while read -r doc; do + echo " β†’ Copying $(basename "$doc") to docs/" + cp "$doc" "$DOC_DIR/" + echo "[INSTALL] $(basename "$doc") copied to docs/" >> "$LOG_FILE" +done + +# Auto-generate Markdown documentation for each bin script with frontmatter +find "$SRC_DIR/bin" -type f -name "*.sh" | while read -r script; do + base="$(basename "$script")" + docfile="$DOC_DIR/${base%.sh}.md" + echo "---" > "$docfile" + echo "title: $base" >> "$docfile" + tags=$(echo "$base" | grep -Eo 'backup|sync|fix|dr|monitor|mastodon|zfs|postgres|minio|disk|alert|verify|restore' | sort -u | tr ' +' ' ' | sed 's/ $//') + if [ -z "$tags" ]; then tags="uncategorized"; fi + echo "categories: [${tags// /, }]" >> "$docfile" + echo "source: bin/$base" >> "$docfile" + echo "generated: $(date -Iseconds)" >> "$docfile" + echo "---" >> "$docfile" + echo >> "$docfile" + echo "# $base" >> "$docfile" + echo >> "$docfile" + head -n 20 "$script" | grep '^#' | sed 's/^# //' >> "$docfile" + echo >> "$docfile" + echo "_Auto-generated from source script on $(date)_" >> "$docfile" + echo "[DOCGEN] $base β†’ $docfile" >> "$LOG_FILE" +done + +# Create tool to summarize installed files +cat > "$TOOL_DIR/list_installed_tools.sh" <<'EOF' +#!/bin/bash +# list_installed_tools.sh +# Summarizes the most recent Genesis tools installation log + +LOG_FILE="$(dirname "$0")/setup_install.log" + +if [[ ! -f "$LOG_FILE" ]]; then + echo "No installation log found at \$LOG_FILE" + exit 1 +fi + +echo "πŸ“‹ Installed Genesis Tools (from \$LOG_FILE):" +echo "--------------------------------------------------" +grep "\[INSTALL\]" "$LOG_FILE" | sed 's/\[INSTALL\] //' | sort +EOF +chmod +x "$TOOL_DIR/list_installed_tools.sh" + +echo "Genesis Tools scaffold complete in: $TOOL_DIR" +echo "All scripts and docs copied from src/. Edit configs in $CONFIG_DIR before use." +echo "Installation log saved to $LOG_FILE" +echo "Run ./list_installed_tools.sh to view installed files." diff --git a/miscellaneous/bash/setup_install.log b/miscellaneous/bash/setup_install.log new file mode 100644 index 0000000..d030938 --- /dev/null +++ b/miscellaneous/bash/setup_install.log @@ -0,0 +1,106 @@ +[INFO] Setup run at Thu May 22 08:38:58 AM EDT 2025 +[INSTALL] README.md copied to /home/doc/genesis-tools/miscellaneous/bash +[INSTALL] db2_backup.sh installed to bin/ +[INSTALL] verifypxe.sh installed to bin/ +[INSTALL] krang_backup.sh installed to bin/ +[INSTALL] fix_queue3.sh installed to bin/ +[INSTALL] freezermove.sh installed to bin/ +[INSTALL] dasystemisdownyo.sh installed to bin/ +[INSTALL] genesis_sync_progress.sh installed to bin/ +[INSTALL] retention.sh installed to bin/ +[INSTALL] rsync_zfs_sync_helper.sh installed to bin/ +[INSTALL] pull_health_everywhere_ntp.sh installed to bin/ +[INSTALL] perms.sh installed to bin/ +[INSTALL] watchdog.sh installed to bin/ +[INSTALL] backup.sh installed to bin/ +[INSTALL] deldirectories.sh installed to bin/ +[INSTALL] dotheneedfuleverywhere.sh installed to bin/ +[INSTALL] tothebank.sh installed to bin/ +[INSTALL] restore.sh installed to bin/ +[INSTALL] fixsudoerseverywhere.sh installed to bin/ +[INSTALL] clean_media.sh installed to bin/ +[INSTALL] hardenit.sh installed to bin/ +[INSTALL] clean_orphans.sh installed to bin/ +[INSTALL] giteapushv3.sh installed to bin/ +[INSTALL] krang_modular_health.sh installed to bin/ +[INSTALL] venv-backup-script.sh installed to bin/ +[INSTALL] p1.sh installed to bin/ +[INSTALL] validate_zfs.sh installed to bin/ +[INSTALL] genesis_check.sh installed to bin/ +[INSTALL] sync-to-vault.sh installed to bin/ +[INSTALL] dr_telegram_alert.sh installed to bin/ +[INSTALL] mastodon_restart.sh installed to bin/ +[INSTALL] sync-trigger.sh installed to bin/ +[INSTALL] copydunkadunk.sh installed to bin/ +[INSTALL] kodakmomentproxmox.sh installed to bin/ +[INSTALL] mastodon_status-check.sh installed to bin/ +[INSTALL] get_telegram_id.sh installed to bin/ +[INSTALL] freezer.sh installed to bin/ +[INSTALL] do_the_needful.sh installed to bin/ +[INSTALL] kodakmoment.sh installed to bin/ +[INSTALL] sync.sh installed to bin/ +[INSTALL] disk_mitigator.sh installed to bin/ +[INSTALL] migrationtoblock.sh installed to bin/ +[INSTALL] dr_mirror_to_linode.sh installed to bin/ +[INSTALL] p2.sh installed to bin/ +[INSTALL] startemup.sh installed to bin/ +[INSTALL] malips.sh installed to bin/ +[INSTALL] verify_minio.sh installed to bin/ +[INSTALL] fix_queue2.sh installed to bin/ +[INSTALL] fix_queue.sh installed to bin/ +[INSTALL] zfs_bootstrap.sh installed to bin/ +[INSTALL] run_prune_from_krang.sh installed to bin/ +[INSTALL] upgrade.sh installed to bin/ +[INSTALL] clean_previewcards.sh installed to bin/ +[DOCGEN] db2_backup.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/db2_backup.md +[DOCGEN] verifypxe.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/verifypxe.md +[DOCGEN] krang_backup.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/krang_backup.md +[DOCGEN] fix_queue3.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/fix_queue3.md +[DOCGEN] freezermove.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/freezermove.md +[DOCGEN] dasystemisdownyo.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/dasystemisdownyo.md +[DOCGEN] genesis_sync_progress.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/genesis_sync_progress.md +[DOCGEN] retention.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/retention.md +[DOCGEN] rsync_zfs_sync_helper.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/rsync_zfs_sync_helper.md +[DOCGEN] pull_health_everywhere_ntp.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/pull_health_everywhere_ntp.md +[DOCGEN] perms.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/perms.md +[DOCGEN] watchdog.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/watchdog.md +[DOCGEN] backup.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/backup.md +[DOCGEN] deldirectories.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/deldirectories.md +[DOCGEN] dotheneedfuleverywhere.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/dotheneedfuleverywhere.md +[DOCGEN] tothebank.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/tothebank.md +[DOCGEN] restore.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/restore.md +[DOCGEN] fixsudoerseverywhere.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/fixsudoerseverywhere.md +[DOCGEN] clean_media.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/clean_media.md +[DOCGEN] hardenit.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/hardenit.md +[DOCGEN] clean_orphans.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/clean_orphans.md +[DOCGEN] giteapushv3.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/giteapushv3.md +[DOCGEN] krang_modular_health.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/krang_modular_health.md +[DOCGEN] venv-backup-script.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/venv-backup-script.md +[DOCGEN] p1.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/p1.md +[DOCGEN] validate_zfs.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/validate_zfs.md +[DOCGEN] genesis_check.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/genesis_check.md +[DOCGEN] sync-to-vault.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/sync-to-vault.md +[DOCGEN] dr_telegram_alert.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/dr_telegram_alert.md +[DOCGEN] mastodon_restart.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/mastodon_restart.md +[DOCGEN] sync-trigger.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/sync-trigger.md +[DOCGEN] copydunkadunk.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/copydunkadunk.md +[DOCGEN] kodakmomentproxmox.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/kodakmomentproxmox.md +[DOCGEN] mastodon_status-check.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/mastodon_status-check.md +[DOCGEN] get_telegram_id.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/get_telegram_id.md +[DOCGEN] freezer.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/freezer.md +[DOCGEN] do_the_needful.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/do_the_needful.md +[DOCGEN] kodakmoment.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/kodakmoment.md +[DOCGEN] sync.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/sync.md +[DOCGEN] disk_mitigator.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/disk_mitigator.md +[DOCGEN] migrationtoblock.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/migrationtoblock.md +[DOCGEN] dr_mirror_to_linode.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/dr_mirror_to_linode.md +[DOCGEN] p2.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/p2.md +[DOCGEN] startemup.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/startemup.md +[DOCGEN] malips.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/malips.md +[DOCGEN] verify_minio.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/verify_minio.md +[DOCGEN] fix_queue2.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/fix_queue2.md +[DOCGEN] fix_queue.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/fix_queue.md +[DOCGEN] zfs_bootstrap.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/zfs_bootstrap.md +[DOCGEN] run_prune_from_krang.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/run_prune_from_krang.md +[DOCGEN] upgrade.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/upgrade.md +[DOCGEN] clean_previewcards.sh β†’ /home/doc/genesis-tools/miscellaneous/bash/docs/clean_previewcards.md