Repository files, collaboration, releases and project activity.
archforge-external-status / scripts/uninstall.shmain
▤ scripts/uninstall.sh827 bytes
14 lines · Select a line number for a permalink
1
#!/usr/bin/env bash2
set -Eeuo pipefail3
[[ $EUID -eq 0 ]] || { echo 'Use sudo.' >&2;exit 1; }4
echo 'Stop/remove application and systemd services? Database and configuration will be KEPT.'5
read -rp 'Type UNINSTALL to confirm: ' ANSWER6
[[ "$ANSWER" == UNINSTALL ]] || exit 17
systemctl disable --now archforge-status-backup.timer archforge-status.service || true8
rm -f /etc/systemd/system/archforge-status.service /etc/systemd/system/archforge-status-backup.service /etc/systemd/system/archforge-status-backup.timer /usr/local/sbin/archforge-status-backup9
systemctl daemon-reload10
rm -rf /opt/archforge-status/app11
rm -f /etc/caddy/conf.d/archforge-status.caddy12
systemctl reload caddy || true13
echo 'Database /var/lib/archforge-status and secrets /etc/archforge-status were kept. Caddy global configuration must be checked manually.'