mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
Go ahead and load kext so MacOS High Sierra users will see kext auth dialog right away.
This commit is contained in:
parent
f13886d343
commit
ada611d597
4 changed files with 33 additions and 11 deletions
|
@ -5,7 +5,7 @@ export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
|
|||
OSX_RELEASE=`sw_vers -productVersion | cut -d . -f 1,2`
|
||||
|
||||
launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
sleep 1
|
||||
sleep 0.5
|
||||
|
||||
cd "/Library/Application Support/ZeroTier/One"
|
||||
|
||||
|
@ -23,29 +23,35 @@ if [ "$OSX_RELEASE" = "10.7" ]; then
|
|||
fi
|
||||
|
||||
rm -rf node.log node.log.old root-topology shutdownIfUnreadable autoupdate.log updates.d ui peers.save
|
||||
|
||||
chown -R 0 tap.kext
|
||||
chgrp -R 0 tap.kext
|
||||
|
||||
if [ ! -f authtoken.secret ]; then
|
||||
head -c 4096 /dev/urandom | md5 | head -c 24 >authtoken.secret
|
||||
head -c 1024 /dev/urandom | md5 | head -c 24 >authtoken.secret
|
||||
chown 0 authtoken.secret
|
||||
chgrp 0 authtoken.secret
|
||||
chmod 0600 authtoken.secret
|
||||
fi
|
||||
|
||||
rm -f zerotier-cli zerotier-idtool
|
||||
ln -sf zerotier-one zerotier-cli
|
||||
ln -sf zerotier-one zerotier-idtool
|
||||
|
||||
mkdir -p /usr/local/bin
|
||||
cd /usr/local/bin
|
||||
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
|
||||
|
||||
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
|
||||
sleep 1
|
||||
|
||||
if [ -f /tmp/zt1-gui-restart.tmp ];
|
||||
if [ -f /tmp/zt1-gui-restart.tmp ]; then
|
||||
for u in `cat /tmp/zt1-gui-restart.tmp`; do
|
||||
su $u -c '/Applications/ZeroTier\ One.app/Contents/MacOS/ZeroTier\ One &' >>/dev/null 2>&1 &
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue