Files

21 lines
518 B
Bash
Raw Permalink Normal View History

2026-02-17 12:13:39 +09:00
#!/usr/bin/env bash
# Stop, disable, and remove the pi-dashboard systemd service.
set -euo pipefail
SERVICE_NAME="pi-dashboard"
UNIT_FILE="/etc/systemd/system/${SERVICE_NAME}.service"
echo "==> Stopping ${SERVICE_NAME}..."
sudo systemctl stop "${SERVICE_NAME}" || true
echo "==> Disabling ${SERVICE_NAME}..."
sudo systemctl disable "${SERVICE_NAME}" || true
echo "==> Removing unit file..."
sudo rm -f "${UNIT_FILE}"
echo "==> Reloading systemd..."
sudo systemctl daemon-reload
echo "==> Done. Service removed."