summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-01-03 12:15:47 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-01-03 12:15:47 -0800
commitbaea75f2dfa21ca76a9b6eb2be83e0681f0024b0 (patch)
treec69f16d76b479ef5d7df44ef81d9e943eeeb1d9a /ext
parent69c993357d2db86b8aa3b4aaaf341df3012eb8e7 (diff)
downloadinfinitytier-baea75f2dfa21ca76a9b6eb2be83e0681f0024b0.tar.gz
infinitytier-baea75f2dfa21ca76a9b6eb2be83e0681f0024b0.zip
Installer app helper...
Diffstat (limited to 'ext')
-rw-r--r--ext/installfiles/mac/install.tmpl.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/installfiles/mac/install.tmpl.sh b/ext/installfiles/mac/install.tmpl.sh
index 75773250..fcb3b69b 100644
--- a/ext/installfiles/mac/install.tmpl.sh
+++ b/ext/installfiles/mac/install.tmpl.sh
@@ -55,6 +55,15 @@ echo 'Installing zerotier-cli command line utility...'
ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" /usr/bin/zerotier-cli
+if [ ! -f '/Library/Application Support/ZeroTier/One/authtoken.secret' ]; then
+ echo 'Pre-creating authtoken.secret for ZeroTier service...'
+ if [ $dryRun -eq 0 ]; then
+ rm -f '/Library/Application Support/ZeroTier/One/authtoken.secret'
+ head -c 1024 /dev/urandom | md5 | head -c 24 >'/Library/Application Support/ZeroTier/One/authtoken.secret'
+ chmod 0600 '/Library/Application Support/ZeroTier/One/authtoken.secret'
+ fi
+fi
+
echo 'Installing and (re-)starting zerotier-one service via launchctl...'
if [ ! -z "`launchctl list | grep -F com.zerotier.one`" ]; then