mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 18:48:36 -07:00
Mac install fixes, remove obsolete stuff, and write local.conf via API for new UI integration.
This commit is contained in:
parent
11b352458e
commit
5005244d1b
6 changed files with 70 additions and 20 deletions
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
export PATH="/Library/Application Support/ZeroTier/One:/bin:/usr/bin:/sbin:/usr/sbin"
|
||||
/usr/bin/killall MacEthernetTapAgent >>/dev/null 2>&1
|
||||
exec zerotier-one
|
||||
|
|
|
@ -11,6 +11,21 @@ if [ ! -f authtoken.secret ]; then
|
|||
chmod 0600 authtoken.secret
|
||||
fi
|
||||
|
||||
if [ -f zerotier-one.pid ]; then
|
||||
kill `cat zerotier-one.pid`
|
||||
sleep 1
|
||||
killall MacEthernetTapAgent
|
||||
sleep 1
|
||||
killall -9 MacEthernetTapAgent
|
||||
sleep 1
|
||||
if [ -f zerotier-one.pid ]; then
|
||||
kill -9 `cat zerotier-one.pid`
|
||||
rm -f zerotier-one.pid
|
||||
fi
|
||||
fi
|
||||
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
sleep 1
|
||||
|
||||
rm -f zerotier-cli zerotier-idtool
|
||||
ln -sf zerotier-one zerotier-cli
|
||||
ln -sf zerotier-one zerotier-idtool
|
||||
|
@ -22,9 +37,6 @@ 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
|
||||
|
||||
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
sleep 2
|
||||
|
||||
if [ -f /tmp/zt1-gui-restart.tmp ]; then
|
||||
for u in `cat /tmp/zt1-gui-restart.tmp`; do
|
||||
if [ -f '/Applications/ZeroTier One.app/Contents/MacOS/ZeroTier One' ]; then
|
||||
|
|
|
@ -25,16 +25,15 @@ for i in `ps axuwww | tr -s ' ' ',' | grep -F '/Applications/ZeroTier.app' | gre
|
|||
done
|
||||
chmod 0600 /tmp/zt1-gui-restart.tmp
|
||||
|
||||
if [ -f /Library/LaunchDaemons/com.zerotier.one.plist ]; then
|
||||
launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
sleep 5
|
||||
fi
|
||||
if [ -f '/Library/Application Support/ZeroTier/One/zerotier-one.pid' ]; then
|
||||
kill -9 `cat /Library/Application Support/ZeroTier/One/zerotier-one.pid`
|
||||
fi
|
||||
|
||||
cd "/Applications"
|
||||
rm -rf "ZeroTier One.app"
|
||||
rm -rf "ZeroTier.app"
|
||||
|
||||
if [ -d '/Library/Application Support/ZeroTier/One' ]; then
|
||||
cd '/Library/Application Support/ZeroTier/One'
|
||||
# ensure that file locking doesn't cause issues with replacing the binary
|
||||
rm -f zerotier-one
|
||||
rm -f MacEthernetTapAgent
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -21,12 +21,10 @@ killall -TERM zerotier-one >>/dev/null 2>&1
|
|||
sleep 1
|
||||
killall -KILL zerotier-one >>/dev/null 2>&1
|
||||
|
||||
echo "Making sure kext is unloaded..."
|
||||
kextunload '/Library/Application Support/ZeroTier/One/tap.kext' >>/dev/null 2>&1
|
||||
|
||||
echo "Removing ZeroTier One files..."
|
||||
|
||||
rm -rf '/Applications/ZeroTier One.app'
|
||||
rm -rf '/Applications/ZeroTier.app'
|
||||
rm -f '/usr/local/bin/zerotier-one' '/usr/local/bin/zerotier-idtool' '/usr/local/bin/zerotier-cli' '/Library/LaunchDaemons/com.zerotier.one.plist'
|
||||
|
||||
cd '/Library/Application Support/ZeroTier/One'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue