mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-25 09:33:24 +01:00
add scripts for pkg creation for mac
This commit is contained in:
parent
f66574b094
commit
ac0e40da7e
31
release_files/darwin_pkg/postinstall
Executable file
31
release_files/darwin_pkg/postinstall
Executable 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
|
6
release_files/darwin_pkg/preinstall
Executable file
6
release_files/darwin_pkg/preinstall
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
echo "Preinstall complete"
|
||||
exit 0 # all good
|
||||
} > /tmp/my_preinstall.log
|
11
release_files/darwin_pkg/requirements.plist
Normal file
11
release_files/darwin_pkg/requirements.plist
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>arch</key>
|
||||
<array>
|
||||
<string>x86_64</string>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user