mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-23 00:23:36 +01:00
32 lines
712 B
Bash
Executable File
32 lines
712 B
Bash
Executable File
#!/bin/sh
|
|
|
|
APP=/Applications/NetBird.app
|
|
AGENT=/usr/local/bin/netbird
|
|
LOG_FILE=/var/log/netbird/client_install.log
|
|
|
|
|
|
echo "Installing NetBird..." &>> $LOG_FILE
|
|
|
|
if test -d $APP; then
|
|
echo "NetBird app copied successfully." &>> $LOG_FILE
|
|
else
|
|
echo "NetBird app could not be copied to the Applications folder." &>> $LOG_FILE
|
|
exit 1
|
|
fi
|
|
|
|
ln -s $APP/Contents/MacOS/netbird $AGENT
|
|
if test -f $AGENT; then
|
|
echo "NetBird binary linked successfully." &>> $LOG_FILE
|
|
else
|
|
echo "NetBird could not create symlink to /usr/local/bin" &>> $LOG_FILE
|
|
exit 1
|
|
fi
|
|
|
|
$AGENT service install
|
|
$AGENT service start
|
|
|
|
open $APP
|
|
|
|
echo "Finished Netbird installation successfully" &>> $LOG_FILE
|
|
exit 0 # all good
|