Initial commit (I feel unsafe)

This commit is contained in:
2026-01-16 00:11:58 -08:00
commit d69daa37bf
121 changed files with 4153 additions and 0 deletions

26
ubuntu_auto_apt_upgrade Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
mkdir -p "${HOME}"/upgrade_logs
logFile=${HOME}/upgrade_logs/$(date +%y_%m).log
rebootDelayInMinutes=10
{
echo "[+] $(date -I'seconds')"
echo "[+] Auto apt upgrade starting..."
sudo apt-get update
sudo apt-get upgrade -y
if [[ -s /var/run/reboot-required ]]; then
curl -Ss \
-H "Title: System Reboot scheduled" \
-H "Priority: 3" \
-H "Tags: loudspeaker,reboot" \
-d "Rebooting in $rebootDelayInMinutes minutes. Reason: package updates" \
"${NOTIF_URL}"
echo "[!] Rebooting in $rebootDelayInMinutes minutes..."
echo 'sudo reboot' | at now + $rebootDelayInMinutes minutes
else
echo "[+] Upgrade complete, no reboot required."
fi
} &>>"$logFile"