diff --git a/install.ps1 b/install.ps1 index 7ecaac8..1d0b08b 100644 --- a/install.ps1 +++ b/install.ps1 @@ -475,7 +475,7 @@ escape_key = "^]" $hostsConfig = Join-Path $configDir "hosts.toml" if ($ForceConfig -or -not (Test-Path $hostsConfig)) { $defaultServer = if ($Server) { $Server } else { "user@example.com" } - $hostUdp = if ($DoshHost) { $DoshHost } else { $defaultServer } + $hostUdpLine = if ($DoshHost) { "dosh_host = `"$DoshHost`"" } else { "# dosh_host = `"server.example.com`"" } @" # Example: # [server] @@ -487,7 +487,7 @@ if ($ForceConfig -or -not (Test-Path $hostsConfig)) { [default] ssh = "$defaultServer" -dosh_host = "$hostUdp" +$hostUdpLine port = $Port predict = true "@ | Set-Content -NoNewline -Encoding utf8 $hostsConfig diff --git a/install.sh b/install.sh index ad0fd3e..44d3a6e 100755 --- a/install.sh +++ b/install.sh @@ -687,9 +687,9 @@ EOF if [ "$force_config" -eq 1 ] || [ ! -f "$hosts_config" ]; then default_server="${server:-user@example.com}" if [ -n "$dosh_host" ]; then - host_udp="$dosh_host" + host_udp_line="dosh_host = \"$dosh_host\"" else - host_udp="$default_server" + host_udp_line="# dosh_host = \"server.example.com\"" fi cat >"$hosts_config" <