mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-22 08:03:30 +01:00
move stopping app and service to preinstall
This commit is contained in:
parent
a0e133bd92
commit
eac492be9b
@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
APP=/Applications/NetBird.app
|
||||
AGENT=/usr/local/bin/netbird
|
||||
LOG_FILE=/var/log/netbird/client_install.log
|
||||
LOG_FILE=/var/log/netbird/client_post_install.log
|
||||
|
||||
mkdir -p /var/log/netbird/
|
||||
mkdir -p /usr/local/bin/
|
||||
@ -17,9 +19,7 @@ mkdir -p /usr/local/bin/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
osascript -e 'quit app "Netbird"' || true
|
||||
|
||||
ln -s $APP/Contents/MacOS/netbird $AGENT
|
||||
ln -fs $APP/Contents/MacOS/netbird $AGENT
|
||||
if test -f $AGENT; then
|
||||
echo "NetBird binary linked successfully."
|
||||
else
|
||||
@ -27,9 +27,6 @@ mkdir -p /usr/local/bin/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$AGENT service stop || true
|
||||
$AGENT service uninstall || true
|
||||
|
||||
$AGENT service install || true
|
||||
$AGENT service start || true
|
||||
|
||||
@ -38,3 +35,4 @@ mkdir -p /usr/local/bin/
|
||||
echo "Finished Netbird installation successfully"
|
||||
exit 0 # all good
|
||||
} &> $LOG_FILE
|
||||
|
||||
|
@ -1,10 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOG_FILE=/var/log/netbird/client_install.log
|
||||
set -x
|
||||
|
||||
LOG_FILE=/var/log/netbird/client_pre_install.log
|
||||
AGENT=/usr/local/bin/netbird
|
||||
|
||||
mkdir -p /var/log/netbird/
|
||||
|
||||
{
|
||||
osascript -e 'quit app "Netbird"' || true
|
||||
$AGENT service stop || true
|
||||
|
||||
echo "Preinstall complete"
|
||||
exit 0 # all good
|
||||
} &> $LOG_FILE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user