diff --git a/app/util/hetzner.py b/app/util/hetzner.py index 5b143e5..7da9ac1 100644 --- a/app/util/hetzner.py +++ b/app/util/hetzner.py @@ -22,7 +22,7 @@ def multiline_to_singleline(input_text: str) -> str: Returns: str: Single-line string with `\\n` replacing newlines. """ - return input_text.replace("\n", "\\n") + return input_text.replace("\n", "\n") def create_instances(request): @@ -30,11 +30,12 @@ def create_instances(request): credentials_for_chisel = util.chisel.generate_credentials() # Define user data - user_data_readable = f"""#cloud-config + user_data_readable = f""" +#cloud-config package_update: true runcmd: -- curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && sudo apt install tmux -y -- sudo docker run -d --restart always -p 9090:9090 -p 443:443 -p 80:80 -it jpillora/chisel:v1.10.1 server --reverse --port=9090 --auth='{credentials_for_chisel}' + - curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && sudo apt install tmux -y + - sudo docker run -d --restart always -p 9090:9090 -p 443:443 -p 80:80 -it docker.io/jpillora/chisel:1.10.1 server --reverse --port=9090 --auth='{credentials_for_chisel}' """ user_data = multiline_to_singleline(user_data_readable)