uninstall.sh hinzugefügt

This commit is contained in:
2025-01-30 18:35:09 +00:00
parent e4a9e49496
commit a63578176a

26
uninstall.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# Prüfen, ob das Skript mit sudo ausgeführt wird
if [[ $EUID -ne 0 ]]; then
echo "Dieses Skript muss mit sudo ausgeführt werden."
exit 1
fi
echo "Deinstalliere Nextcloud Log Alert..."
# Variablen
INSTALL_DIR="/opt/nextcloud_log_alert"
SERVICE_FILE="/etc/systemd/system/nextcloud_log_alert.service"
# Dienst stoppen und deaktivieren
systemctl stop nextcloud_log_alert.service
systemctl disable nextcloud_log_alert.service
rm -f "$SERVICE_FILE"
# Systemd neu laden
systemctl daemon-reload
# Installationsverzeichnis löschen
rm -rf "$INSTALL_DIR"
echo "Nextcloud Log Alert wurde erfolgreich entfernt."