prep script
This commit is contained in:
25
prep_script.sh
Normal file
25
prep_script.sh
Normal 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."
|
||||
Reference in New Issue
Block a user