From c5a3e80113f13884c797caac4212162430c9e659 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 2 Jun 2015 16:54:27 -0700 Subject: [PATCH] Linux installer tweaks, and Mac updater tweak. --- ext/installfiles/linux/install.tmpl.sh | 24 ++++++++++++------------ service/OneService.cpp | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/installfiles/linux/install.tmpl.sh b/ext/installfiles/linux/install.tmpl.sh index 8773a21c7..24425cbb0 100644 --- a/ext/installfiles/linux/install.tmpl.sh +++ b/ext/installfiles/linux/install.tmpl.sh @@ -6,6 +6,7 @@ shopt -s expand_aliases dryRun=0 echo "*** ZeroTier One install/update ***" +echo if [ "$UID" -ne 0 ]; then echo "Not running as root so doing dry run (no modifications to system)..." @@ -118,10 +119,12 @@ if [ -n "$SYSTEMDUNITDIR" -a -d "$SYSTEMDUNITDIR" ]; then rm -f /tmp/systemd_zerotier-one.service /tmp/init.d_zerotier-one systemctl enable zerotier-one.service - #if [ "$origVersion" != "$newVersion" ]; then - # echo 'Version has changed, starting...' - # systemctl restart zerotier-one.service - #fi + + echo + echo 'Done! Installed and service configured to start at system boot.' + echo + echo "To start now or restart the service if it's already running:" + echo ' sudo systemctl restart zerotier-one.service' else # SYSV INIT -- also covers upstart which supports SysVinit backward compatibility @@ -163,14 +166,11 @@ else fi fi - #if [ "$origVersion" != "$newVersion" ]; then - # echo 'Version has changed, starting...' - # if [ -f /sbin/service -o -f /usr/sbin/service ]; then - # service zerotier-one restart - # else - # /etc/init.d/zerotier-one restart - # fi - #fi + echo + echo 'Done! Installed and service configured to start at system boot.' + echo + echo "To start now or restart the service if it's already running:" + echo ' sudo service zerotier-one restart' fi exit 0 diff --git a/service/OneService.cpp b/service/OneService.cpp index 9a024c2ce..a2ccc6dc1 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -248,7 +248,7 @@ public: fprintf(bash, "#!/bin/bash\n" "export PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin\n" - "sleep 2\n" + "sleep 1\n" "installer -pkg \"%s\" -target /\n" "sleep 1\n" "rm -f \"%s\" \"%s\"\n"