From 752f9f4e42fed6c50efbd2812592d90ac2ea90e2 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:47:06 +0200 Subject: [PATCH] RustDesk Server: write the creds file with heredocs Matches how the other install scripts write their creds; the file is unchanged. --- install/rustdeskserver-install.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/install/rustdeskserver-install.sh b/install/rustdeskserver-install.sh index 4691106b3..cfcc3fb2f 100644 --- a/install/rustdeskserver-install.sh +++ b/install/rustdeskserver-install.sh @@ -42,17 +42,19 @@ write_creds() { msg_error "hbbs did not create ${key_file}" exit 1 fi - { - echo "RustDesk Server" - echo "ID Server: ${LOCAL_IP}" - echo "Key: $(<"$key_file")" - if ((INSTALL_API)); then - echo "" - echo "RustDesk API Web UI: http://${LOCAL_IP}:21114/_admin/" - echo "Username: admin" - echo "Password: ${API_PASS}" - fi - } >~/rustdesk.creds + cat <~/rustdesk.creds +RustDesk Server +ID Server: ${LOCAL_IP} +Key: $(<"$key_file") +EOF + if ((INSTALL_API)); then + cat <>~/rustdesk.creds + +RustDesk API Web UI: http://${LOCAL_IP}:21114/_admin/ +Username: admin +Password: ${API_PASS} +EOF + fi } setup_deb_based() {