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
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
APP=/Applications/NetBird.app
|
APP=/Applications/NetBird.app
|
||||||
AGENT=/usr/local/bin/netbird
|
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 /var/log/netbird/
|
||||||
mkdir -p /usr/local/bin/
|
mkdir -p /usr/local/bin/
|
||||||
@ -17,9 +19,7 @@ mkdir -p /usr/local/bin/
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
osascript -e 'quit app "Netbird"' || true
|
ln -fs $APP/Contents/MacOS/netbird $AGENT
|
||||||
|
|
||||||
ln -s $APP/Contents/MacOS/netbird $AGENT
|
|
||||||
if test -f $AGENT; then
|
if test -f $AGENT; then
|
||||||
echo "NetBird binary linked successfully."
|
echo "NetBird binary linked successfully."
|
||||||
else
|
else
|
||||||
@ -27,9 +27,6 @@ mkdir -p /usr/local/bin/
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$AGENT service stop || true
|
|
||||||
$AGENT service uninstall || true
|
|
||||||
|
|
||||||
$AGENT service install || true
|
$AGENT service install || true
|
||||||
$AGENT service start || true
|
$AGENT service start || true
|
||||||
|
|
||||||
@ -38,3 +35,4 @@ mkdir -p /usr/local/bin/
|
|||||||
echo "Finished Netbird installation successfully"
|
echo "Finished Netbird installation successfully"
|
||||||
exit 0 # all good
|
exit 0 # all good
|
||||||
} &> $LOG_FILE
|
} &> $LOG_FILE
|
||||||
|
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/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/
|
mkdir -p /var/log/netbird/
|
||||||
|
|
||||||
{
|
{
|
||||||
|
osascript -e 'quit app "Netbird"' || true
|
||||||
|
$AGENT service stop || true
|
||||||
|
|
||||||
echo "Preinstall complete"
|
echo "Preinstall complete"
|
||||||
exit 0 # all good
|
exit 0 # all good
|
||||||
} &> $LOG_FILE
|
} &> $LOG_FILE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user