mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-08-23 11:26:55 +00:00
update
This commit is contained in:
parent
82147ba4bd
commit
99abefe98e
1 changed files with 9 additions and 3 deletions
12
update.sh
12
update.sh
|
@ -73,14 +73,21 @@ function fuSELFUPDATE () {
|
||||||
exec ./update.sh
|
exec ./update.sh
|
||||||
else
|
else
|
||||||
exec ./update.sh -y $myTPOT_TYPE
|
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
|
fi
|
||||||
else
|
else
|
||||||
echo "###### $myBLUE""Pulling updates from repository.""$myWHITE"
|
echo "###### $myBLUE""Pulling updates from repository.""$myWHITE"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git pull origin update --force
|
git pull origin update --force
|
||||||
fi
|
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
|
exit 1
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -203,7 +210,6 @@ function fuRESTORE () {
|
||||||
sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env
|
sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fuREADTPOT_TYPE () {
|
function fuREADTPOT_TYPE () {
|
||||||
if [ -f .env ]; then
|
if [ -f .env ]; then
|
||||||
# reads the TPOT_TYPE from the .env file
|
# reads the TPOT_TYPE from the .env file
|
||||||
|
|
Loading…
Reference in a new issue