Linux installer tweaks, and Mac updater tweak.

This commit is contained in:
Adam Ierymenko 2015-06-02 16:54:27 -07:00
parent 806ea79f37
commit c5a3e80113
2 changed files with 13 additions and 13 deletions

View File

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

View File

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