From aac571e4c730426e2157b13f92de9e40ec920946 Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Mon, 21 Mar 2016 14:11:00 -0700 Subject: [PATCH] asdf --- install.sh | 33 ++++++++++++++++++++++----------- install.sh~ | 5 ++--- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index 0d415a5..890f9b2 100755 --- a/install.sh +++ b/install.sh @@ -23,20 +23,31 @@ if [[ $GATEWAY_NAME == "" ]]; then fi echo GATEWAY_NAME: $GATEWAY_NAME -printf " Contact email: " -read GATEWAY_EMAIL +if [[ $GATEWAY_EMAIL == "" ]]; then + echo "ERROR: NO GATEWAY_EMAIL FOUND IN ENVIRONMENT" + exit 1 +fi +echo GATEWAY_EMAIL: $GATEWAY_EMAIL -printf " Latitude [0]: " -read GATEWAY_LAT -if [[ $GATEWAY_LAT == "" ]]; then GATEWAY_LAT=0; fi +if [[ $GATEWAY_LAT == "" ]]; then + echo "ERROR: NO GATEWAY_LAT (latitude) FOUND IN ENVIRONMENT" + exit 1 +fi +echo GATEWAY_LAT: $GATEWAY_LAT -printf " Longitude [0]: " -read GATEWAY_LON -if [[ $GATEWAY_LON == "" ]]; then GATEWAY_LON=0; fi +if [[ $GATEWAY_LON == "" ]]; then + echo "ERROR: NO GATEWAY_LON (longitude) FOUND IN ENVIRONMENT" + exit 1 +fi +echo GATEWAY_LON: $GATEWAY_LON -printf " Altitude [0]: " -read GATEWAY_ALT -if [[ $GATEWAY_ALT == "" ]]; then GATEWAY_ALT=0; fi +if [[ $GATEWAY_ALT == "" ]]; then + echo "ERROR: NO GATEWAY_ALT (altitude) FOUND IN ENVIRONMENT" + exit 1 +fi +echo GATEWAY_ALT: $GATEWAY_ALT + +echo "" # Check dependencies echo "Installing dependencies..." diff --git a/install.sh~ b/install.sh~ index c16fe74..0d415a5 100755 --- a/install.sh~ +++ b/install.sh~ @@ -12,13 +12,12 @@ VERSION="master" if [[ $1 != "" ]]; then VERSION=$1; fi echo "The Things Network Gateway installer" -echo "Version $VERSION" +echo "" # Retrieve gateway configuration for later echo "Configuring gateway:" -if [ $GATEWAY_NAME == "" ]; -then +if [[ $GATEWAY_NAME == "" ]]; then echo "ERROR: NO GATEWAY_NAME FOUND IN ENVIRONMENT" exit 1 fi