15 строки
436 B
Bash
Исполняемый файл
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'
|