From 67eefc4d97b8b4502f2746c18cc0315904dd1809 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 22 Apr 2026 14:27:22 -0400 Subject: [PATCH] Remove obsolete root overlay scripts --- root/live-update.sh | 29 --------------- root/sanitize.sh | 90 --------------------------------------------- 2 files changed, 119 deletions(-) delete mode 100644 root/live-update.sh delete mode 100644 root/sanitize.sh diff --git a/root/live-update.sh b/root/live-update.sh deleted file mode 100644 index 8dfa5bd..0000000 --- a/root/live-update.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -gitUrl="https://git.stormux.org/storm/gaming-image-files" -gitPath="${gitUrl##*/}" -pushd /tmp || exit -git clone "${gitUrl}" -pushd "${gitPath}" || exit -git checkout testing -git lfs pull -# Files and directories to ignore when copying -ignoreFiles=(".git" "./image" ".git*") -# Build find command with ignore patterns -findArgs=() -for ignore in "${ignoreFiles[@]}"; do - if [[ "$ignore" == .* && "$ignore" != ./* ]]; then - findArgs+=(-name "$ignore" -prune -o) - else - findArgs+=(-path "$ignore" -prune -o) - fi -done -# Copy all files as root (preserves permissions properly) -find . "${findArgs[@]}" -type f -exec bash -c 'for i ; do cp -av --preserve=all --parents "${i}" /;done' _ "{}" \; -# Fix ownership of home directory files -chown -R stormux:users /home/stormux -popd || exit -rm -rf "${gitPath}" -popd || exit - -exit 0 diff --git a/root/sanitize.sh b/root/sanitize.sh deleted file mode 100644 index e233729..0000000 --- a/root/sanitize.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -echo "Starting system cleanup for image preparation..." - -# Reset to headless screen driver -rm /etc/X11/xorg.conf.d/10-*.conf -cp /home/stormux/.local/files/10-headless.conf /etc/X11/xorg.conf.d/ - -find / -type d -name "__pycache__" -exec rm -rfv "{}" + - -# Clear package caches -pacman -Scc --noconfirm -rm -rfv /home/stormux/.cache/yay - -# Remove files but keep directory structure -find /home/stormux/Logs -type f -delete -find /home/stormux/Roms -type f -delete - -# Remove All except parent directory -find /home/stormux/Downloads -mindepth 1 -delete -find /home/stormux/Library -mindepth 1 -delete -find /home/stormux/Music -mindepth 1 -delete -rm -fv /home/stormux/.config/stormux/*.conf - -# Clean user caches and temp files -rm -rfv /home/stormux/.cache/* - -# Clean browser data -rm -rfv /home/stormux/.config/BraveSoftware - -# Clean bash history -rm -fv /home/stormux/.bash_histor* -rm -fv /root/.bash_histor* - -# Reset machine -rm -fv /etc/NetworkManager/system-connections/* -rm -fv /etc/ssh/ssh_host_* -rm -rfv /tmp/* -rm -rfv /var/log/* -rm -fv /root/.ssh/known_hosts /home/*/.ssh/known_hosts -rm -fv /var/lib/dhcp/* /var/lib/NetworkManager/*lease* -rm -fv /etc/machine-id - - -# Remove minidlna data -rm -rfv /var/cache/private/minidlna - -# Make sure we don't ship for-pay games or save files -rm -rfv /home/stormux/.local/games/periphery-synthetic-ep -rm -rfv /home/stormux/.local/games/SideParty -rm -rfv /home/stormux/.local/games/ToyMania -rm -fv /home/stormux/.local/games/Crazy-Party-beta82/save.bin -rm -rfv /home/stormux/.local/games/Upheaval -rm -rfv /home/stormux/.local/games/Warsim -rm -rfv "/home/stormux/.local/share/2MB Solutions/MineRacer" -rm -rfv "/home/stormux/.local/share/LWorks" - -# Disable services -systemctl disable bluetooth.service -systemctl disable fstrim.timer - -# Keep SSH enabled temporarily while the gaming image transition is being tested. -systemctl enable sshd.service -mkdir -p /home/stormux/.local/.services -touch /home/stormux/.local/.services/sshd.service - -# Enable battery monitoring service -systemctl enable battery-monitor.service - -# Restore defaults -cp /etc/speech-dispatcher/speechd.conf.bak /etc/speech-dispatcher/speechd.conf -touch /home/stormux/.firstboot - -if [[ "$1" == "-0" ]]; then -# Zero fill free space to improve compression -echo "Zero-filling free space (this may take a while)..." -sudo dd if=/dev/zero of=/zero.fill bs=1M status=progress || true -sudo rm -f /zero.fill -fi - -# Sync to ensure all writes are committed to disk -echo "Syncing disks..." -sync - -# Clear the journal -journalctl --rotate -journalctl --vacuum-time=1s - -echo "Cleanup complete. Ready for imaging." -exit 0