Mac install fixes, remove obsolete stuff, and write local.conf via API for new UI integration.

This commit is contained in:
Adam Ierymenko 2021-09-01 21:55:54 -04:00
commit 5005244d1b
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
6 changed files with 70 additions and 20 deletions

View file

@ -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