Files
worker/scripts/uninstall-systemd.sh
Gleb Tv 2c7a0236da feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
2026-07-13 17:55:14 +03:00

15 строки
436 B
Bash
Исполняемый файл

#!/usr/bin/env bash
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
printf 'Run this uninstaller as root.\n' >&2
exit 1
fi
systemctl disable --now rsmon-worker.service 2>/dev/null || true
rm -f /etc/systemd/system/rsmon-worker.service /usr/local/bin/rsmon-worker
systemctl daemon-reload
printf 'Binary and service removed. Configuration and state were preserved in:\n'
printf ' /etc/rsmon-worker\n /var/lib/rsmon-worker\n'