mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-12 18:00:49 +01:00
35c7cae267
This was causing issues on new models
33 lines
941 B
Bash
33 lines
941 B
Bash
#!/bin/sh
|
|
|
|
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin
|
|
|
|
# check if wiretrustee is installed
|
|
WT_BIN=$(which wiretrustee)
|
|
if [ -n "$WT_BIN" ]
|
|
then
|
|
echo "Stopping and uninstalling Wiretrustee daemon"
|
|
wiretrustee service stop || true
|
|
wiretrustee service uninstall || true
|
|
fi
|
|
# check if netbird is installed
|
|
NB_BIN=$(which netbird)
|
|
if [ -z "$NB_BIN" ]
|
|
then
|
|
echo "Netbird daemon is not installed. Please run: brew install netbirdio/tap/netbird"
|
|
exit 1
|
|
fi
|
|
NB_UI_VERSION=$1
|
|
NB_VERSION=$(netbird version)
|
|
if [ "X-$NB_UI_VERSION" != "X-$NB_VERSION" ]
|
|
then
|
|
echo "Netbird's daemon is running with a different version than the Netbird's UI:"
|
|
echo "Netbird UI Version: $NB_UI_VERSION"
|
|
echo "Netbird Daemon Version: $NB_VERSION"
|
|
echo "Please run: brew install netbirdio/tap/netbird"
|
|
echo "to update it"
|
|
fi
|
|
# start netbird daemon service
|
|
echo "Starting Netbird daemon"
|
|
netbird service install || true
|
|
netbird service start || true |