Navidrome now-playing, clock, and weather for a Waveshare epd4in0e panel, with a local web UI and install/uninstall scripts for the Pi.
68 lines
2.7 KiB
Bash
Executable File
68 lines
2.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# Reverses what InkyPi's install.sh did, based on reading that script
|
|
# directly (fatihak/InkyPi/install/install.sh). Run this ON the Pi, as root.
|
|
#
|
|
# Paperwall is fully standalone -- it vendors its own copy of the Waveshare
|
|
# driver files and has its own venv, so it doesn't need InkyPi installed at
|
|
# all. This script is purely optional cleanup for whenever you're done with
|
|
# InkyPi as a fallback.
|
|
#
|
|
# Deliberately leaves alone:
|
|
# - SPI/I2C being enabled in /boot/firmware/config.txt -- Paperwall
|
|
# needs those same interfaces for the same panel. Disabling them
|
|
# would break it too.
|
|
# - zramswap / earlyoom services -- these are general Pi memory-management
|
|
# helpers install.sh set up (Bookworm zramswap + earlyoom), not InkyPi
|
|
# app state. Generically useful to keep running. Uncomment below if you
|
|
# really want them gone.
|
|
# - The git clone at ~/InkyPi -- not needed by Paperwall for anything, just
|
|
# left in place in case you want InkyPi back someday. Delete manually or
|
|
# pass --purge-clone.
|
|
#
|
|
# Usage: sudo bash uninstall_inkypi.sh [--purge-clone]
|
|
|
|
set -euo pipefail
|
|
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo "Run as root (sudo bash uninstall_inkypi.sh)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "==> Stopping and disabling inkypi.service"
|
|
systemctl disable --now inkypi.service 2>/dev/null || echo " (not running/installed, skipping)"
|
|
|
|
echo "==> Removing systemd unit"
|
|
rm -f /etc/systemd/system/inkypi.service
|
|
systemctl daemon-reload
|
|
|
|
echo "==> Removing installed app (/usr/local/inkypi, includes venv_inkypi)"
|
|
rm -rf /usr/local/inkypi
|
|
|
|
echo "==> Removing CLI executable (/usr/local/bin/inkypi)"
|
|
rm -f /usr/local/bin/inkypi
|
|
|
|
if [[ "${1:-}" == "--purge-clone" ]]; then
|
|
echo "==> Removing git clone at ~/InkyPi (--purge-clone was passed)"
|
|
echo " NOTE: this also deletes src/config/device.json, which has your"
|
|
echo " old Navidrome credentials in plaintext -- fine if that's the point."
|
|
rm -rf ~/InkyPi
|
|
else
|
|
echo "==> Leaving ~/InkyPi in place (not needed by Paperwall, just kept as a fallback)."
|
|
echo " Re-run with --purge-clone to remove it too."
|
|
echo " NOTE: ~/InkyPi/src/config/device.json still has your old Navidrome"
|
|
echo " credentials in plaintext if you want to wipe just that file instead."
|
|
fi
|
|
|
|
cat <<'MSG'
|
|
|
|
==> InkyPi app removed. Left untouched on purpose:
|
|
- SPI/I2C interfaces in /boot/firmware/config.txt (Paperwall needs them)
|
|
- zramswap / earlyoom services (general Pi memory helpers, not InkyPi-specific)
|
|
|
|
To also remove those memory-management services:
|
|
sudo systemctl disable --now zramswap
|
|
sudo apt remove -y zram-tools
|
|
sudo systemctl disable --now earlyoom
|
|
sudo apt remove -y earlyoom
|
|
MSG
|