From 62de6a0b2acb0f48cb6bd69c92b520a18622a7ff Mon Sep 17 00:00:00 2001 From: Stephan Reinwald Date: Mon, 27 Jan 2025 14:10:34 +0100 Subject: [PATCH] prep script --- prep_script.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 prep_script.sh diff --git a/prep_script.sh b/prep_script.sh new file mode 100644 index 0000000..c57744c --- /dev/null +++ b/prep_script.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Create the folder at /etc/ld-install +mkdir -p /etc/ld-install + +# Define the URLs of the files to download +YAML_URL="https://files.sbe.de/users/smk/ld40-install/application.yaml" +INSTALLER_URL="https://files.sbe.de/users/smk/ld40-install/ld-install" + +# Download the files to the created folder +wget -o /etc/ld-install/application.yaml "$YAML_URL" +wget -o /etc/ld-install/ld-install "$INSTALLER_URL" +chmod +x /etc/ld-install/ld-install + +# Append PermitRootLogin yes to /etc/ssh/sshd_config +echo "PermitRootLogin yes" >> /etc/ssh/sshd_config + +# Restart the ssh service using systemctl +systemctl restart sshd + +# Change the root user password to Muster24! +echo -e "Muster24!\nMuster24!" | passwd root + +# Output completion message +echo "Script execution completed successfully."