updated install script and uninstall script

This commit is contained in:
2025-07-23 15:49:14 -05:00
parent 7230171518
commit 79289dee10
3 changed files with 54 additions and 27 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
SERVICE_NAME="sentryx-server"
SERVICE_FILE="/etc/systemd/system/$SERVICE_NAME.service"
INSTALL_DIR="$HOME/sentryx-server" # Make sure this matches your install script
echo "Stopping and disabling systemd service..."
sudo systemctl stop "$SERVICE_NAME.service" || true
sudo systemctl disable "$SERVICE_NAME.service" || true
echo "Removing systemd service file..."
sudo rm -f "$SERVICE_FILE"
echo "Reloading systemd daemon..."
sudo systemctl daemon-reload
echo "Removing installation directory..."
rm -rf "$INSTALL_DIR"
rm -rf "${INSTALL_DIR}-backup"
echo "Uninstall complete."