From 8158a8b39e9e0f5c1a32b6eed08852d8dc204e8b Mon Sep 17 00:00:00 2001 From: Zachary Robert Thomas Boyd Date: Sun, 9 Mar 2014 01:18:59 -0500 Subject: [PATCH] _ --- install.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 264a767..760d340 100644 --- a/install.sh +++ b/install.sh @@ -3,16 +3,20 @@ URL=http://bit.ly/tor-router-zip WAIT=1 -echo "Updating Apt" -apt-get update; -echo "Installing prerequisites" -apt-get install -y -qq php5-cli unzip make uuid screen; -echo "Downloading auto-configuration toolkit from $URL" -wget $URL -O /tmp/master.zip; -sha1sum /tmp/master.zip > /etc/update_checksum -cd /tmp && unzip ./master.zip; -cd /tmp/tor-router-master && make && make install; -echo "Setting new hostname" +if [ ! -e /etc/update_checksum ]; then + echo "Updating Apt" + apt-get update; + echo "Installing prerequisites" + apt-get install -y -qq php5-cli unzip make uuid screen; + echo "Downloading auto-configuration toolkit from $URL" + wget $URL -O /tmp/master.zip; + sha1sum /tmp/master.zip > /etc/update_checksum + cd /tmp && unzip ./master.zip; + cd /tmp/tor-router-master && make && make install; + echo "Setting new hostname" -echo "Hostname >>>$(hostname -f)<<<" -/sbin/reboot \ No newline at end of file + echo "Hostname >>>$(hostname -f)<<<" + /sbin/reboot +else + /usr/local/bin/tor-router-update.sh +fi