diff --git a/setup/pi/setup-teslausb b/setup/pi/setup-teslausb index 635a4ca..5eadefd 100644 --- a/setup/pi/setup-teslausb +++ b/setup/pi/setup-teslausb @@ -1,12 +1,10 @@ #!/bin/bash -eu -USER_ENABLED_PUSHOVER=false +USER_ENABLED_PUSHOVER=${USER_ENABLED_PUSHOVER:-false} SETUP_LOGFILE=/boot/teslausb-headless-setup.log REPO=${REPO:-cimryan} BRANCH=${BRANCH:-master} HEADLESS_SETUP=${HEADLESS_SETUP:-false} -REPO=rtgoodwin -BRANCH=headless-patch if ! [ $(id -u) = 0 ] @@ -17,12 +15,19 @@ fi function setup_progress () { if [ $HEADLESS_SETUP = "true" ] + then echo "$( date ) : $1" >> "$SETUP_LOGFILE" - else - echo $1 fi + echo $1 } +function headless_populate_variables () { + # Pull in the conf file variables to make avail to this script and subscripts + if [ -e /boot/teslausb_setup_variables.conf ] && [ $HEADLESS_SETUP = "true" ] + then + source /boot/teslausb_setup_variables.conf + fi +} function headless_mark_setup_failed () { setup_log "ERROR: Setup Failed."