Files
sentryx/uninstall.sh

23 lines
542 B
Bash

#!/bin/bash
set -e
SERVICE_NAME="sentryx"
SERVICE_FILE="/etc/systemd/system/$SERVICE_NAME.service"
INSTALL_DIR="$HOME/sentryx"
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."