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

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