diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index a822a46dc..24c5a5354 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -457,11 +457,11 @@ if [ ${isMounted} -eq 0 ]; then /home/admin/config.scripts/blitz.datadrive.sh status >> ${logFile} # determine correct setup phase - infoMessage="Please Login for Setup" + infoMessage="Please start Setup" setupPhase="setup" if [ "${hddGotMigrationData}" != "" ]; then - infoMessage="Please Login for Migration" + infoMessage="Please start Migration" setupPhase="migration" # check if lightning is outdated migrationMode="normal" @@ -480,10 +480,10 @@ if [ ${isMounted} -eq 0 ]; then # TODO: improve version/update detection later isRecovery=$(echo "${hddRaspiVersion}" | grep -c "${codeVersion}") if [ "${isRecovery}" == "1" ]; then - infoMessage="Please Login for Recovery" + infoMessage="Please start Recovery" setupPhase="recovery" else - infoMessage="Please Login for Update" + infoMessage="Please start Update" setupPhase="update" fi diff --git a/home.admin/config.scripts/blitz.debug.sh b/home.admin/config.scripts/blitz.debug.sh index a3743fc5c..d47b10c09 100755 --- a/home.admin/config.scripts/blitz.debug.sh +++ b/home.admin/config.scripts/blitz.debug.sh @@ -238,10 +238,11 @@ echo "--> CHECK CONFIG: sudo nginx -t" sudo nginx -t 2>&1 echo +echo "*** BLITZAPI STATUS ***" +/home/admin/config.scripts/blitz.web.api.sh info if [ $(sudo systemctl status blitzapi 2>/dev/null | grep -c "blitzapi.service") -lt 1 ]; then echo "- BLITZAPI is not running" else - echo "*** BLITZAPI SYSTEMD STATUS ***" sudo systemctl status blitzapi -n2 --no-pager echo @@ -251,6 +252,10 @@ else echo fi +echo "*** BLITZ WebUI STATUS ***" +/home/admin/config.scripts/blitz.web.ui.sh info +echo + if [ "${touchscreen}" == "" ] || [ "${touchscreen}" == "0" ] || [ "${touchscreen}" == "off" ]; then echo "- TOUCHSCREEN is OFF by config" else diff --git a/home.admin/config.scripts/blitz.web.api.sh b/home.admin/config.scripts/blitz.web.api.sh index e90abb981..6874de75c 100644 --- a/home.admin/config.scripts/blitz.web.api.sh +++ b/home.admin/config.scripts/blitz.web.api.sh @@ -12,6 +12,7 @@ FALLACK_BRANCH="dev" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then echo "Manage RaspiBlitz Web API" + echo "blitz.web.api.sh info" echo "blitz.web.api.sh on [GITHUBUSER] [REPO] [BRANCH] [?COMMITORTAG]" echo "blitz.web.api.sh on DEFAULT" echo "blitz.web.api.sh update-config" @@ -20,6 +21,34 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; exit 1 fi +################### +# INFO +################### +if [ "$1" = "info" ]; then + + # check if installed + cd /home/blitzapi/blitz_api + if [ "$?" != "0" ]; then + echo "installed=0" + exit 1 + fi + echo "installed=1" + + # get github origin repo from repo directory with git command + origin=$(sudo -u blitzapi git config --get remote.origin.url) + echo "repo='${origin}'" + + # get github branch from repo directory with git command + branch=$(sudo -u blitzapi git rev-parse --abbrev-ref HEAD) + echo "branch='${branch}'" + + # get github commit from repo directory with git command + commit=$(sudo -u blitzapi git rev-parse HEAD) + echo "commit='${commit}'" + + exit 0 +fi + ################### # UPDATE CONFIG ################### diff --git a/home.admin/config.scripts/blitz.web.ui.sh b/home.admin/config.scripts/blitz.web.ui.sh index 65b392812..13502db38 100755 --- a/home.admin/config.scripts/blitz.web.ui.sh +++ b/home.admin/config.scripts/blitz.web.ui.sh @@ -9,6 +9,7 @@ FALLACK_BRANCH="master" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then echo "Manage RaspiBlitz WebUI" + echo "blitz.web.ui.sh info" echo "blitz.web.ui.sh on [GITHUBUSER] [REPO] [BRANCH] [?COMMITORTAG]" echo "blitz.web.ui.sh on DEFAULT" echo "blitz.web.ui.sh update" @@ -16,6 +17,34 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; exit 0 fi +################### +# INFO +################### +if [ "$1" = "info" ]; then + + # check if installed + cd /home/blitzapi/blitz_web + if [ "$?" != "0" ]; then + echo "installed=0" + exit 1 + fi + echo "installed=1" + + # get github origin repo from repo directory with git command + origin=$(sudo git config --get remote.origin.url) + echo "repo='${origin}'" + + # get github branch from repo directory with git command + branch=$(sudo git rev-parse --abbrev-ref HEAD) + echo "branch='${branch}'" + + # get github commit from repo directory with git command + commit=$(sudo git rev-parse HEAD) + echo "commit='${commit}'" + + exit 0 +fi + # check if started with sudo if [ "$EUID" -ne 0 ]; then echo "error='run as root'" diff --git a/home.admin/config.scripts/internet.sh b/home.admin/config.scripts/internet.sh index fb0f3d9a8..bbe6f4ab6 100755 --- a/home.admin/config.scripts/internet.sh +++ b/home.admin/config.scripts/internet.sh @@ -181,9 +181,9 @@ if [ ${runGlobal} -eq 1 ]; then globalIP="" echo "# getting public IP from third party service" if [ "${ipv6}" == "on" ]; then - globalIP=$(curl -s -f -S -m 5 http://v6.ipv6-test.com/api/myip.php 2>/dev/null) + globalIP=$(curl -s -f -S -m 10 http://v6.ipv6-test.com/api/myip.php 2>/dev/null) else - globalIP=$(curl -s -f -S -m 5 http://v4.ipv6-test.com/api/myip.php 2>/dev/null) + globalIP=$(curl -s -f -S -m 10 http://v4.ipv6-test.com/api/myip.php 2>/dev/null) fi echo "## curl returned: ${globalIP}" echo "## curl exit code: ${?}"