From 94445800defb99aaa339cfe338590171bc666658 Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Thu, 6 Jul 2023 17:44:57 +0200 Subject: [PATCH] Add Raspberry Pi support. --- PREVIEW.md | 6 ++++++ install.sh | 15 ++++++++++++--- installer/install/tpot.yml | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/PREVIEW.md b/PREVIEW.md index 2691f35a..4fd6d437 100644 --- a/PREVIEW.md +++ b/PREVIEW.md @@ -89,11 +89,17 @@ Choose a supported distro of your choice. It is recommended to use the minimum / |:-----------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|:-------------- | [AlmaLinux](https://almalinux.org) | [download](https://mirrors.almalinux.org/isos/x86_64/9.2.html) | [download](https://mirrors.almalinux.org/isos/aarch64/9.2.html) | [Debian](https://www.debian.org/index.en.html) | [download](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.0.0-amd64-netinst.iso) | [download](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.0.0-arm64-netinst.iso) +| [DietPi](https://dietpi.com/#home) | | [download](https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bookworm.7z) | [Fedora](https://fedoraproject.org) | [download](https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/x86_64/iso/Fedora-Server-netinst-x86_64-38-1.6.iso) | [download](https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/aarch64/iso/Fedora-Server-netinst-aarch64-38-1.6.iso) | [OpenSuse](https://www.opensuse.org) | [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](https://rockylinux.org) | [download](https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.2-x86_64-minimal.iso) | [download](https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.2-aarch64-minimal.iso) | [Ubuntu](https://ubuntu.com) | [download](https://releases.ubuntu.com/22.04.2/ubuntu-22.04.2-live-server-amd64.iso) | [download](https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04.2-live-server-arm64.iso) +## Raspberry Pi 4 (8GB) Support +| Distribution Name | arm64 | Notes +|:-----------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------|:-------------- +| [DietPi](https://dietpi.com/#home) | [download](https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bookworm.7z) | In DietPi config you need to choose OpenSSH instead of Dropbear or T-Pot will fail to install +| [Raspberry Pi OS](https://www.raspberrypi.com) | [download](https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz) |

diff --git a/install.sh b/install.sh index db61c96b..e6a2fbe1 100755 --- a/install.sh +++ b/install.sh @@ -42,7 +42,7 @@ echo "$myINSTALLER" echo echo echo "### This script will now install T-Pot and all of its dependencies." -while [ "${myQST}" != "y" ] && [ "{$myQST}" != "n" ]; +while [ "${myQST}" != "y" ] && [ "${myQST}" != "n" ]; do echo read -p "### Install? (y/n) " myQST @@ -115,7 +115,7 @@ if [[ "${myANSIBLE_DISTRIBUTIONS[@]}" =~ "${myCURRENT_DISTRIBUTION}" ]]; fi # Download tpot.yml if not found locally -if [ ! -f installer/install/tpot.yml ]; +if [ ! -f installer/install/tpot.yml ] && [ ! -f tpot.yml ]; then echo "### Now downloading T-Pot Ansible Installation Playbook ... " wget -qO tpot.yml https://github.com/telekom-security/tpotce/raw/dev/installer/install/tpot.yml @@ -123,7 +123,12 @@ if [ ! -f installer/install/tpot.yml ]; echo else echo "### Using local T-Pot Ansible Installation Playbook ... " - myANSIBLE_TPOT_PLAYBOOK="installer/install/tpot.yml" + if [ -f "installer/install/tpot.yml" ]; + then + myANSIBLE_TPOT_PLAYBOOK="installer/install/tpot.yml" + else + myANSIBLE_TPOT_PLAYBOOK="tpot.yml" + fi fi # Check type of sudo access @@ -157,6 +162,10 @@ if [ ! $? -eq 0 ]; echo fi +# Preparing web user for T-Pot +echo +echo "### T-Pot User Configuration ..." +echo # Asking for web user name myWEB_USER="" while [ 1 != 2 ]; diff --git a/installer/install/tpot.yml b/installer/install/tpot.yml index 91e9dcf2..76eba92f 100644 --- a/installer/install/tpot.yml +++ b/installer/install/tpot.yml @@ -106,6 +106,7 @@ - name: Syncing clocks (All) shell: "hwclock --hctosys" when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Rocky", "Ubuntu"] + ignore_errors: true tags: - "AlmaLinux" - "Debian"