mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-08-23 03:16: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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue