Files
runtipi/apps/rego-tunnel/shared/uninstall-host-services.sh
alexz c3581c7ecc
Some checks failed
Test / test (push) Has been cancelled
Add install/uninstall scripts for host systemd services
- install-host-services.sh: Creates watcher path/service units
- uninstall-host-services.sh: Removes units and cleans up
- Run once on host after app install
2026-01-17 03:59:06 +00:00

25 lines
659 B
Bash

#!/usr/bin/env bash
#
# Uninstall host-side systemd services for rego-tunnel
#
set -euo pipefail
echo "Removing rego-tunnel host services..."
# Stop and disable the watcher
sudo systemctl stop rego-routing-watcher.path 2>/dev/null || true
sudo systemctl disable rego-routing-watcher.path 2>/dev/null || true
# Remove routing rules
/etc/runtipi/repos/runtipi/apps/rego-tunnel/shared/host-routing.sh stop 2>/dev/null || true
# Remove systemd units
sudo rm -f /etc/systemd/system/rego-routing-watcher.path
sudo rm -f /etc/systemd/system/rego-routing-watcher.service
# Reload systemd
sudo systemctl daemon-reload
echo ""
echo "Done! Host services removed."