适用于Linux的Azure扩展脚本 [英] Azure Extension script for linux
问题描述
我试图通过使用'&&'分隔每个命令来执行多个shell脚本使用适用于Linux的Azure自定义扩展脚本.
I am trying to execute multiple shell scripts by separating each command using '&&' using Azure Custom Extension script for Linux.
ARM模板是部署模型.
ARM templates is the deployment model.
示例片段:
"settings": {
"fileUris": "[script1,script2, script3]",
"commandToExecute": "sh script1.sh && sh scrip2.sh && sh script3.sh"
}
但是仅执行第一个脚本,而其他两个脚本不执行.
But only the first script executes and the other two scripts doesn't execute.
注意:脚本日志"路径中也没有错误.我也看到了所有下载到waagent文件夹路径中的脚本.
Note : There are no errors in Script logs path too. I see all the scripts downloaded in waagent folder path too.
任何帮助都会非常有用.
Any help will be be really great.
操作系统:Linux
Operating System: Linux
推荐答案
ARM模板代码段
cmdToExecute = script1.sh param1 param2&& script2.sh param1 param2&& script3.sh作为字符串传递给
cmdToExecute = script1.sh param1 param2 && script2.sh param1 param2 && script3.sh is passed as a string to a wrapper script like
"commandToExecute" : "[concat('sh script_executor.sh \"', parameters('cmdToExecute') '\"')]"
script_executor.sh-将所有命令作为参数并执行每个命令
script_executor.sh -- takes all commands as parameters and executes each command
这篇关于适用于Linux的Azure扩展脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!