Compare commits

...

16 commits

Author SHA1 Message Date
dz
f6f9e0bf42
Merge cbcf7871ec into 5a69b3d460 2025-08-15 09:56:55 +02:00
t3chn0m4g3
5a69b3d460 Fix links and add support for Debian 13 2025-08-12 20:26:05 +02:00
Daniel Ortiz
cbcf7871ec update, refactory to master 2025-07-12 21:23:12 -04:00
Daniel Ortiz
c38fab7670 update, refactory to master 2025-07-12 21:22:27 -04:00
Daniel Ortiz
444b181075 update, refactory to master 2025-07-12 21:21:44 -04:00
Daniel Ortiz
59c6672df7 update, refactory to master 2025-07-12 21:03:48 -04:00
Daniel Ortiz
87733c6b65 update 2025-07-12 21:00:06 -04:00
Daniel Ortiz
f609e20567 update 2025-07-12 20:58:46 -04:00
Daniel Ortiz
78acb5f5c0 update 2025-07-12 20:52:11 -04:00
Daniel Ortiz
99abefe98e update 2025-07-12 20:51:47 -04:00
Daniel Ortiz
82147ba4bd update 2025-07-12 20:44:57 -04:00
Daniel Ortiz
a7af16f69a momentarily changes the fork branch 2025-07-12 20:41:20 -04:00
Daniel Ortiz
5e333eba59 momentarily changes the fork branch 2025-07-12 20:39:02 -04:00
Daniel Ortiz
c2748f9904 momentarily changes the fork branch 2025-07-12 20:37:00 -04:00
Daniel Ortiz
d94207e56e update update.sh, discriminate whether it is SENSOR or HIVE 2025-07-12 20:33:09 -04:00
Daniel Ortiz
cb8933cddb update update.sh, discriminate whether it is SENSOR or HIVE 2025-07-12 20:31:18 -04:00
4 changed files with 80 additions and 24 deletions

View file

@ -326,11 +326,11 @@ Once you are familiar with how things work you should choose a network you suspe
| Distribution Name | x64 | arm64 |
| :--------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------- |
| [Alma Linux OS 9.6 Boot ISO](https://almalinux.org) | [download](https://repo.almalinux.org/almalinux/9.6/isos/x86_64/AlmaLinux-9.6-x86_64-boot.iso) | [download](https://repo.almalinux.org/almalinux/9.6/isos/aarch64/AlmaLinux-9.6-aarch64-boot.iso) |
| [Debian 12 Network Install](https://www.debian.org/CD/netinst/index.en.html) | [download](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso) | [download](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.11.0-arm64-netinst.iso) |
| [Debian 13 Network Install](https://www.debian.org/CD/netinst/index.en.html) | [download](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.0.0-amd64-netinst.iso) | [download](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-13.0.0-arm64-netinst.iso) |
| [Fedora Server 42 Network Install](https://fedoraproject.org/server/download) | [download](https://download.fedoraproject.org/pub/fedora/linux/releases/42/Server/x86_64/iso/Fedora-Server-netinst-x86_64-42-1.1.iso) | [download](https://download.fedoraproject.org/pub/fedora/linux/releases/42/Server/aarch64/iso/Fedora-Server-netinst-aarch64-42-1.1.iso) |
| [OpenSuse Tumbleweed Network Image](https://get.opensuse.org/tumbleweed/#download) | [download](https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-NET-x86_64-Current.iso) | [download](https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumbleweed-NET-aarch64-Current.iso) |
| [Rocky Linux OS 9.6 Boot ISO](https://rockylinux.org/download) | [download](https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.6-x86_64-minimal.iso) | [download](https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.6-aarch64-minimal.iso) |
| [Ubuntu 24.04.2 Live Server](https://ubuntu.com/download/server) | [download](https://releases.ubuntu.com/24.04/ubuntu-24.04.2-live-server-amd64.iso) | [download](https://cdimage.ubuntu.com/releases/24.04/release/ubuntu-24.04.2-live-server-arm64.iso) |
| [Ubuntu 24.04.3 Live Server](https://ubuntu.com/download/server) | [download](https://releases.ubuntu.com/24.04/ubuntu-24.04.3-live-server-amd64.iso) | [download](https://cdimage.ubuntu.com/releases/24.04/release/ubuntu-24.04.3-live-server-arm64.iso) |
<br>

View file

@ -206,17 +206,23 @@ if [ ! -f installer/install/tpot.yml ] && [ ! -f tpot.yml ];
fi
# Check type of sudo access
sudo -n true > /dev/null 2>&1
if [ $? -eq 1 ];
if myANSIBLE_TAG="Debian";
# Debian 13 - sudo seems to apply stricter settings, we now ask for the become password
then
myANSIBLE_BECOME_OPTION="--ask-become-pass"
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo
myANSIBLE_BECOME_OPTION="--become --ask-become-pass"
else
myANSIBLE_BECOME_OPTION="--become"
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo
sudo -n true > /dev/null 2>&1
if [ $? -eq 1 ];
then
myANSIBLE_BECOME_OPTION="--ask-become-pass"
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo
else
myANSIBLE_BECOME_OPTION="--become"
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo
fi
fi
# Run Ansible Playbook

View file

@ -63,17 +63,23 @@ if [[ "${myANSIBLE_DISTRIBUTIONS[@]}" =~ "${myCURRENT_DISTRIBUTION}" ]];
fi
# Check type of sudo access
sudo -n true > /dev/null 2>&1
if [ $? -eq 1 ];
if myANSIBLE_TAG="Debian";
# Debian 13 - sudo seems to apply stricter settings, we now ask for the become password
then
myANSIBLE_BECOME_OPTION="--ask-become-pass"
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo
myANSIBLE_BECOME_OPTION="--become --ask-become-pass"
else
myANSIBLE_BECOME_OPTION="--become"
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo
sudo -n true > /dev/null 2>&1
if [ $? -eq 1 ];
then
myANSIBLE_BECOME_OPTION="--ask-become-pass"
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo
else
myANSIBLE_BECOME_OPTION="--become"
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo
fi
fi
# Run Ansible Playbook

View file

@ -53,6 +53,7 @@ function fuCHECKINET () {
function fuSELFUPDATE () {
echo
echo "### Now checking for newer files in repository ..."
echo "### T-Pot... TPOT_TYPE is set to: $myTPOT_TYPE"
git fetch --all
myREMOTESTAT=$(git status | grep -c "up-to-date")
if [ "$myREMOTESTAT" != "0" ];
@ -67,13 +68,31 @@ function fuSELFUPDATE () {
echo "###### $myBLUE""Found newer version, will be pulling updates and restart myself.""$myWHITE"
git reset --hard
git pull --force
exec ./update.sh -y
exit 1
else
# check if myTPOT_TYPE is set
if [ -z "$myTPOT_TYPE" ]; then
exec ./update.sh
else
exec ./update.sh -y $myTPOT_TYPE
fi
else
echo "###### $myBLUE""Pulling updates from repository.""$myWHITE"
git reset --hard
git pull --force
fi
if [ -z "$myTPOT_TYPE" ]; then
echo
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"
if [ "$myTPOT_TYPE" == "SENSOR" ]; then
echo "### Copying compose/sensor.yml to docker-compose.yml"
cp compose/sensor.yml docker-compose.yml
else
echo
fi
fi
exit 1
echo
}
@ -194,6 +213,19 @@ 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
myTPOT_TYPE=$(grep -E '^TPOT_TYPE=' .env | cut -d '=' -f2)
# Verify if TPOT_TYPE is set
if [ -z "$myTPOT_TYPE" ]; then
myTPOT_TYPE="HIVE"
fi
else
myTPOT_TYPE="HIVE"
fi
}
################
# Main section #
################
@ -211,11 +243,23 @@ if [ "$1" != "-y" ]; then
exit
fi
# if exists second argument, use it as T-Pot type, only if SENSOR or HIVE
if [ -n "$2" ]; then
if [[ "$2" == "SENSOR" || "$2" == "HIVE" ]]; then
myTPOT_TYPE="$2"
else
myTPOT_TYPE="HIVE"
fi
else
myTPOT_TYPE="HIVE"
fi
fuREADTPOT_TYPE
fuCHECK_VERSION
fuCHECKINET "https://index.docker.io https://github.com"
fuSTOP_TPOT
fuBACKUP
fuSELFUPDATE "$0" "$@"
fuSELFUPDATE "$0" "$@" "$myTPOT_TYPE"
fuUPDATER
fuRESTORE