Feature/update check (#1232)

Periodically fetch the latest available version, and the UI will shows a new menu for the download link. It checks both the daemon version and the UI version.
This commit is contained in:
Zoltan Papp
2023-10-30 10:32:48 +01:00
committed by GitHub
parent 52f5101715
commit 6d4240a5ae
23 changed files with 492 additions and 18 deletions

View File

@@ -10,6 +10,7 @@ then
wiretrustee service stop || true
wiretrustee service uninstall || true
fi
# check if netbird is installed
NB_BIN=$(which netbird)
if [ -z "$NB_BIN" ]
@@ -41,4 +42,4 @@ netbird service install 2> /dev/null || true
netbird service start || true
# start app
open /Applications/Netbird\ UI.app
open /Applications/Netbird\ UI.app

View File

@@ -8,6 +8,13 @@ AGENT=/usr/local/bin/netbird
mkdir -p /var/log/netbird/
{
# check if it was installed with brew
brew list --formula | grep netbird
if [ $? -eq 0 ]
then
echo "NetBird has been installed with Brew. Please use Brew to update the package."
exit 1
fi
osascript -e 'quit app "Netbird"' || true
$AGENT service stop || true