diff options
Diffstat (limited to 'ext/installfiles/mac/postinst.sh')
-rwxr-xr-x | ext/installfiles/mac/postinst.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/installfiles/mac/postinst.sh b/ext/installfiles/mac/postinst.sh index b4ea2ee2..95301a4e 100755 --- a/ext/installfiles/mac/postinst.sh +++ b/ext/installfiles/mac/postinst.sh @@ -3,6 +3,7 @@ export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin OSX_RELEASE=`sw_vers -productVersion | cut -d . -f 1,2` +DARWIN_MAJOR=`uname -r | cut -d . -f 1` launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1 sleep 0.5 @@ -43,9 +44,11 @@ rm -f zerotier-cli zerotier-idtool ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" zerotier-cli ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" zerotier-idtool -cd "/Library/Application Support/ZeroTier/One" -kextload -r . tap.kext >>/dev/null 2>&1 & -disown %1 +if [ $DARWIN_MAJOR -le 16 ]; then + cd "/Library/Application Support/ZeroTier/One" + kextload -r . tap.kext >>/dev/null 2>&1 & + disown %1 +fi launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1 |