Skip to content

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 bash
2set -Eeuo pipefail
3[[ $EUID -eq 0 ]] || { echo 'Use sudo.' >&2;exit 1; }
4echo 'Stop/remove application and systemd services? Database and configuration will be KEPT.'
5read -rp 'Type UNINSTALL to confirm: ' ANSWER
6[[ "$ANSWER" == UNINSTALL ]] || exit 1
7systemctl disable --now archforge-status-backup.timer archforge-status.service || true
8rm -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-backup
9systemctl daemon-reload
10rm -rf /opt/archforge-status/app
11rm -f /etc/caddy/conf.d/archforge-status.caddy
12systemctl reload caddy || true
13echo 'Database /var/lib/archforge-status and secrets /etc/archforge-status were kept. Caddy global configuration must be checked manually.'