mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-15 11:21:04 +01:00
6d4240a5ae
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.
25 lines
500 B
Bash
Executable File
25 lines
500 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
LOG_FILE=/var/log/netbird/client_pre_install.log
|
|
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
|
|
|
|
echo "Preinstall complete"
|
|
exit 0 # all good
|
|
} &> $LOG_FILE
|
|
|