From d039717a0076f86ccc20f2373c3e871eae3ed5ed Mon Sep 17 00:00:00 2001 From: TechHutTV Date: Thu, 21 May 2026 17:21:31 -0700 Subject: [PATCH] Fix script to remove /usr/local/sbin/netbird on unintstall --- plugin/netbird.plg | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugin/netbird.plg b/plugin/netbird.plg index 5648b00..4df471a 100644 --- a/plugin/netbird.plg +++ b/plugin/netbird.plg @@ -176,11 +176,21 @@ echo "" /dev/null +/usr/local/sbin/netbird down >/dev/null 2>&1 +pkill -f '/usr/local/sbin/netbird service run' 2>/dev/null +sleep 1 +pkill -9 -f '/usr/local/sbin/netbird service run' 2>/dev/null +rm -f /var/run/netbird.sock /var/run/netbird.pid -# Remove binary +# Tear down the WireGuard interface if it's still up +ip link delete wt0 2>/dev/null + +# Remove binary (default path plus any stray copy still on PATH) rm -f /usr/local/sbin/netbird +for b in $(command -v netbird 2>/dev/null); do rm -f "$b"; done +hash -r 2>/dev/null # Remove plugin package removepkg unraid-netbird-utils 2>/dev/null