Azure Extension script for linux

我的梦境 提交于 2019-12-02 02:14:39
SaiVikas

ARM template Snippet

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 -- takes all commands as parameters and executes each command

If you have multiple scripts, you can author an entry point script that calls the dependent scripts, then upload the entry point script, dependent scripts and any other dependent binaries to the script location(Azure storage blob or GitHub). You can use following format to ensure multiple files are uploaded: “fileUris” : [“ScriptFileUri1”, “ScriptFileUri2”, "ScriptFileUri3"]

More information please refer to this link.

If you want to set script1.sh as the entry point script, you could edit you script such as below:

##script in scrpit1.sh
echo "hello world" 
##call script2.sh
./script2.sh 

##call script3.sh
./script3.sh
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!