mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-28 21:26:40 +00:00
20 lines
480 B
Bash
Executable File
20 lines
480 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin
|
|
|
|
NB_BIN=$(command -v netbird)
|
|
if [ -n "$NB_BIN" ]; then
|
|
echo "Stopping NetBird daemon"
|
|
"$NB_BIN" service stop 2>/dev/null || true
|
|
echo "Uninstalling NetBird daemon"
|
|
"$NB_BIN" service uninstall 2>/dev/null || true
|
|
fi
|
|
|
|
PLIST=/Library/LaunchDaemons/netbird.plist
|
|
if [ -f "$PLIST" ]; then
|
|
launchctl bootout system "$PLIST" 2>/dev/null || launchctl unload "$PLIST" 2>/dev/null || true
|
|
rm -f "$PLIST"
|
|
fi
|
|
|
|
exit 0
|