diff --git a/release_files/darwin_pkg/postinstall b/release_files/darwin_pkg/postinstall new file mode 100755 index 000000000..b87ef490e --- /dev/null +++ b/release_files/darwin_pkg/postinstall @@ -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 diff --git a/release_files/darwin_pkg/preinstall b/release_files/darwin_pkg/preinstall new file mode 100755 index 000000000..6e9c1d9f0 --- /dev/null +++ b/release_files/darwin_pkg/preinstall @@ -0,0 +1,6 @@ +#!/bin/sh + +{ + echo "Preinstall complete" + exit 0 # all good +} > /tmp/my_preinstall.log diff --git a/release_files/darwin_pkg/requirements.plist b/release_files/darwin_pkg/requirements.plist new file mode 100644 index 000000000..dd904f049 --- /dev/null +++ b/release_files/darwin_pkg/requirements.plist @@ -0,0 +1,11 @@ + + + + + arch + + x86_64 + arm64 + + +