Running Shell Scripts
This action aims to run shell scripts on a host in a specified environment. The following table shows the configuration.
Parameter |
Description |
---|---|
Action Name |
Name of an added deployment action. Max 128 characters. Do not start or end with a space. Use letters, digits, spaces, and these special characters: -_,;:./(). |
Environment |
Select a host cluster as the deployment object. |
Running Mode |
Default and Background are available.
NOTE:
|
Shell Script Path |
Path of the shell script on the target host. |
Running Parameters |
Before executing the script, set parameters. During script execution, the entered parameter values are loaded and used. |
Control Options |
|
How Do I Use Script Execution Parameters?
- Use $1, $2, and similar formats in the shell script to reference parameter. For example, the content of the hello.sh script is shown in the following figure.
Figure 1 Script content
- Separate running parameters with spaces, as shown in the following figure.
Figure 2 Entering running parameters
- View the result.
In the script, $1 is replaced with test2, and the test2 directory is created.
Figure 3 Viewing the result
If you encounter any problem during deployment, see Solutions to Common Problems.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot