add scripts for pkg creation for mac

This commit is contained in:
Pascal Fischer
2023-05-23 18:15:05 +02:00
parent f66574b094
commit ac0e40da7e
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,31 @@
#!/bin/sh
APP=/Applications/NetBird.app
AGENT=/usr/local/bin/netbird
{
echo "Installing NetBird..."
if test -d $APP; then
echo "NetBird app copied successfully."
else
echo "NetBird app could not be copied to the Applications folder."
exit 1
fi
ln -s $APP/netbird $AGENT
if test -f $AGENT; then
echo "NetBird binary linked successfully."
else
echo "NetBird could not create symlink to /usr/local/bin"
exit 1
fi
$AGENT service install
$AGENT service start
open $APP
echo "Finished Netbird installation successfully"
exit 0 # all good
} > /tmp/my_postinstall.log