mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Variable checks in case populated in conf file
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user