#!/usr/bin/env bash
|
set -euo pipefail
|
|
SERVICE_NAME="${SERVICE_NAME:-jhm-service}"
|
TARGET_PATH="/etc/systemd/system/${SERVICE_NAME}.service"
|
|
sudo systemctl stop "${SERVICE_NAME}" || true
|
sudo systemctl disable "${SERVICE_NAME}" || true
|
sudo rm -f "${TARGET_PATH}"
|
sudo systemctl daemon-reload
|
|
echo "Service removed: ${SERVICE_NAME}"
|