Remove obsolete root overlay scripts

This commit is contained in:
Storm Dragon
2026-04-22 14:27:22 -04:00
parent 153fbd90d2
commit 67eefc4d97
2 changed files with 0 additions and 119 deletions

View File

@@ -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

View File

@@ -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