Skip to content

Commit 6d35541

Browse files
fix missing \
Signed-off-by: bryan <[email protected]>
1 parent 78e100f commit 6d35541

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

scripts/kvm/build_meta.sh

+1-18
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if [ -n "${login_port}" ] && [ "${login_port}" != "22" ] && [ ${login_port} -gt
106106
' - sed -i \"s/^#Port .*/Port '${login_port}'/\" /etc/ssh/sshd_config\n'\
107107
' - sed -i \"s/^Port .*/Port '${login_port}'/\" /etc/ssh/sshd_config\n'\
108108
' - systemctl daemon-reload\n'\
109-
' - systemctl restart ssh.socket\n'
109+
' - systemctl restart ssh.socket\n'\
110110
' - systemctl restart sshd || systemctl restart ssh\n'
111111
)
112112
fi
@@ -119,23 +119,6 @@ if [ "${os_code}" != "windows" ]; then
119119
sed -i -n '1h; 1!H; ${ x; s/\n/\\n/g; p; }' $latest_dir/vendor_data.json
120120
fi
121121

122-
# write script part windows powershell script to change the RDP port
123-
# and restart the RDP service
124-
# and configure windows firewall to allow the new RDP port
125-
# if [ -n "${login_port}" ] && [ "${login_port}" != "3389" ] && [ "${os_code}" = "windows" ]; then
126-
# (
127-
# echo '<powershell>\r'
128-
# echo '$new_port = '${login_port}'\r'
129-
# echo '$old_port = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\").PortNumber\r'
130-
# echo 'if ($new_port -ne $old_port) {\r'
131-
# echo ' Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name PortNumber -Value $new_port\r'
132-
# echo ' Restart-Service -Name "TermService" -Force\r'
133-
# echo ' New-NetFirewallRule -DisplayName "RDP-TCP-$($new_port)" -Action Allow -Protocol TCP -LocalPort $new_port\r'
134-
# echo '}\r'
135-
# echo '</powershell>'
136-
# ) > $latest_dir/change_rdp_port.ps1
137-
# fi
138-
139122
[ -z "$dns" ] && dns=$dns_server
140123
net_json=$(jq 'del(.userdata) | del(.vlans) | del(.keys) | del(.security) | del(.login_port) | del(.root_passwd) | del(.dns)' <<< $vm_meta | jq --arg dns $dns '.services[0].type = "dns" | .services[0].address |= .+$dns')
141124
let mtu=$(cat /sys/class/net/$vxlan_interface/mtu)-50

0 commit comments

Comments
 (0)