prep script

This commit is contained in:
Stephan Reinwald
2025-01-27 14:10:34 +01:00
parent dc7545dda5
commit 62de6a0b2a

25
prep_script.sh Normal file
View File

@@ -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."