From 99abefe98ee635a13ead1e7490ae32b7a19aee0a Mon Sep 17 00:00:00 2001 From: Daniel Ortiz Date: Sat, 12 Jul 2025 20:51:47 -0400 Subject: [PATCH] update --- update.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 4bf8cddc..44b1be17 100755 --- a/update.sh +++ b/update.sh @@ -73,14 +73,21 @@ function fuSELFUPDATE () { exec ./update.sh else exec ./update.sh -y $myTPOT_TYPE - grep -q "^TPOT_TYPE=" .env && sed -i "s/^TPOT_TYPE=.*/TPOT_TYPE=${myTPOT_TYPE}/" .env - echo "### T-Pot type set to: $myTPOT_TYPE in .env" fi else echo "###### $myBLUE""Pulling updates from repository.""$myWHITE" git reset --hard git pull origin update --force fi + + if [ -z "$myTPOT_TYPE" ]; then + echo "### TPOT_TYPE not set in .env file. Defaulting to HIVE." + else + grep -q "^TPOT_TYPE=" .env && sed -i "s/^TPOT_TYPE=.*/TPOT_TYPE=${myTPOT_TYPE}/" .env + echo "### T-Pot type set to: $myTPOT_TYPE in .env" + fi + + exit 1 echo @@ -203,7 +210,6 @@ function fuRESTORE () { sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env } - function fuREADTPOT_TYPE () { if [ -f .env ]; then # reads the TPOT_TYPE from the .env file