uninstall.sh hinzugefügt
This commit is contained in:
26
uninstall.sh
Normal file
26
uninstall.sh
Normal 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."
|
Reference in New Issue
Block a user