moved service uninstall and app close into postinstall

This commit is contained in:
Pascal Fischer 2023-06-06 00:04:57 +02:00
parent 933fe1964a
commit bbf536be85
2 changed files with 7 additions and 6 deletions

View File

@ -17,6 +17,8 @@ mkdir -p /usr/local/bin/
exit 1
fi
osascript -e 'quit app "Netbird"' || true
ln -s $APP/Contents/MacOS/netbird $AGENT
if test -f $AGENT; then
echo "NetBird binary linked successfully."
@ -25,8 +27,11 @@ mkdir -p /usr/local/bin/
exit 1
fi
$AGENT service install
$AGENT service start
$AGENT service stop || true
$AGENT service uninstall || true
$AGENT service install || true
$AGENT service start || true
open $APP

View File

@ -5,10 +5,6 @@ LOG_FILE=/var/log/netbird/client_install.log
mkdir -p /var/log/netbird/
{
netbird service stop || true
netbird service uninstall || true
pkill -f netbird || true
echo "Preinstall complete"
exit 0 # all good
} &> $LOG_FILE