Files
nano-fcp/uninstall-services.sh

19 lines
558 B
Bash

#!/usr/bin/env bash
# Remove RKNN counter systemd services.
# Run on the target device: sudo ./uninstall-services.sh
set -euo pipefail
if [[ "$(id -u)" -ne 0 ]]; then
echo "Run as root: sudo ./uninstall-services.sh"
exit 1
fi
for unit in feedmill-counter feedmill-dashboard feedmill feedmill-counter-dashboard; do
systemctl stop "${unit}" 2>/dev/null || true
systemctl disable "${unit}" 2>/dev/null || true
rm -f "/etc/systemd/system/${unit}.service"
done
systemctl daemon-reload
echo "Removed feedmill-counter and feedmill-dashboard services."