1
0
mirror of synced 2025-02-12 10:09:24 +03:00

Fix Azure deploy

- Fix handling of special characters in the Azure deployment config
  by quoting the VPN parameters
- Fixes #644. Thanks @turbozapekanka for the report!
This commit is contained in:
hwdsl2 2019-11-01 21:34:56 -07:00
parent 3858040f55
commit 3b6a61481f
3 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,8 @@
- Operating System Image 操作系统镜像Debian 9 或 Ubuntu 16.04 LTS - Operating System Image 操作系统镜像Debian 9 或 Ubuntu 16.04 LTS
- Virtual Machine Size (虚拟机大小,默认值: Standard_B1s - Virtual Machine Size (虚拟机大小,默认值: Standard_B1s
**注:** \*不要\* 在值中使用这些字符: `\ " '`
请单击以下按钮开始: 请单击以下按钮开始:
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank"> <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank">

View File

@ -12,6 +12,8 @@ Customizable with the following options:
- Operating System Image (Debian 9 or Ubuntu 16.04 LTS) - Operating System Image (Debian 9 or Ubuntu 16.04 LTS)
- Virtual Machine Size (Default: Standard_B1s) - Virtual Machine Size (Default: Standard_B1s)
**Note:** DO NOT use these special characters within values: `\ " '`
Press this button to start: Press this button to start:
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank"> <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank">

View File

@ -47,6 +47,7 @@
} }
}, },
"variables": { "variables": {
"quote": "'",
"location": "[resourceGroup().location]", "location": "[resourceGroup().location]",
"vmName": "vpnserver", "vmName": "vpnserver",
"virtualNetworkName": "vpnVnet", "virtualNetworkName": "vpnVnet",
@ -71,7 +72,7 @@
"version": "latest" "version": "latest"
}, },
"installScriptURL": "https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/azure/install.sh", "installScriptURL": "https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/azure/install.sh",
"installCommand": "[concat('sh install.sh ', parameters('preSharedKey'), ' ', parameters('username'), ' ', parameters('password'))]" "installCommand": "[concat('sh install.sh ', variables('quote'), parameters('preSharedKey'), variables('quote'), ' ', variables('quote'), parameters('username'), variables('quote'), ' ', variables('quote'), parameters('password'), variables('quote'))]"
}, },
"resources": [ "resources": [
{ {