mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
Mac .pkg building using Packages (third party app) instead of old bootstrapping .app and installer script.
This commit is contained in:
parent
f48509d50c
commit
89027d78ac
7 changed files with 1025 additions and 188 deletions
22
ext/installfiles/mac/postinst.sh
Executable file
22
ext/installfiles/mac/postinst.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
sleep 1
|
||||
killall zerotier-one
|
||||
sleep 1
|
||||
killall -9 zerotier-one
|
||||
|
||||
cd "/Library/Application Support/ZeroTier/One"
|
||||
rm -rf node.log node.log.old root-topology shutdownIfUnreadable autoupdate.log updates.d
|
||||
if [ ! -f authtoken.secret ]; then
|
||||
head -c 1024 /dev/urandom | md5 | head -c 24 >authtoken.secret
|
||||
chown root authtoken.secret
|
||||
chgrp wheel authtoken.secret
|
||||
chmod 0600 authtoken.secret
|
||||
fi
|
||||
|
||||
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue