From eaf7bc91616c72fd2d80e87ded8b773a2d2d33f5 Mon Sep 17 00:00:00 2001 From: romeo-golf Date: Mon, 6 Feb 2017 02:07:13 +0000 Subject: [PATCH] PiAware - Relocate manual user/pass config #306 --- bash/feeders/piaware.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bash/feeders/piaware.sh b/bash/feeders/piaware.sh index 2e410d9..66f7d90 100755 --- a/bash/feeders/piaware.sh +++ b/bash/feeders/piaware.sh @@ -193,7 +193,13 @@ if [[ "${FLIGHTAWARE_LOCAL_CREDENTIALS}" -eq "1" ]] ; then FLIGHTAWAREPASSWORD2=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${FLIGHTAWAREPASSWORD2_TITLE}" --nocancel --passwordbox "\nConfirm your FlightAware password." 8 78 3>&1 1>&2 2>&3) done done + else + # Display a message to the user stating they need to manually claim their device. + whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Claim Your PiAware Device" --msgbox "Please supply your FlightAware login in order to claim this device, after supplying this you will ask you to enter your password for verification.\n\nIf you decide not to provide a login and password at this time you should still be able to claim your feeder by visting the following site:\n\nhttp://flightaware.com/adsb/piaware/claim" 13 78 + fi +fi +if [[ -n "${FLIGHTAWARELOGIN}" ]] && [[ -n "${FLIGHTAWAREPASSWORD1}" ]] ; then # Set the supplied user name and password in the configuration. echo -e "\e[94m Setting the flightaware-user setting using piaware-config...\e[97m" echo -e "" @@ -207,14 +213,8 @@ if [[ "${FLIGHTAWARE_LOCAL_CREDENTIALS}" -eq "1" ]] ; then echo -e "" sudo /etc/init.d/piaware restart echo -e "" - - else - # Display a message to the user stating they need to manually claim their device. - whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Claim Your PiAware Device" --msgbox "Please supply your FlightAware login in order to claim this device, after supplying this you will ask you to enter your password for verification.\n\nIf you decide not to provide a login and password at this time you should still be able to claim your feeder by visting the following site:\n\nhttp://flightaware.com/adsb/piaware/claim" 13 78 - fi fi - ### SETUP COMPLETE # Enter into the project root directory.