Merge pull request #1631 from al-cheb/al-cheb/opt-dir-perm
[Ubuntu] Set chmod -R 777 /opt
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
## File: post-deployment.sh
|
||||||
|
## Desc: Post deployment actions
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# set chmod -R 777 /opt
|
||||||
|
if [[ -d "/opt" ]]; then
|
||||||
|
echo "chmod -R 777 /opt"
|
||||||
|
chmod -R 777 /opt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove installer and helper folders
|
||||||
|
rm -rf $HELPER_SCRIPT_FOLDER
|
||||||
|
rm -rf $INSTALLER_SCRIPT_FOLDER
|
||||||
|
chmod 755 $IMAGE_FOLDER
|
||||||
@@ -303,10 +303,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"inline": [
|
"scripts":[
|
||||||
"rm -rf {{user `helper_script_folder`}}",
|
"{{template_dir}}/scripts/installers/post-deployment.sh"
|
||||||
"rm -rf {{user `installer_script_folder`}}",
|
],
|
||||||
"chmod 755 {{user `image_folder`}}"
|
"environment_vars":[
|
||||||
|
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
|
||||||
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
||||||
|
"IMAGE_FOLDER={{user `image_folder`}}"
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -307,10 +307,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"inline": [
|
"scripts":[
|
||||||
"rm -rf {{user `helper_script_folder`}}",
|
"{{template_dir}}/scripts/installers/post-deployment.sh"
|
||||||
"rm -rf {{user `installer_script_folder`}}",
|
],
|
||||||
"chmod 755 {{user `image_folder`}}"
|
"environment_vars":[
|
||||||
|
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
|
||||||
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
||||||
|
"IMAGE_FOLDER={{user `image_folder`}}"
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -307,6 +307,18 @@
|
|||||||
"destination": "{{template_dir}}/Ubuntu2004-README.md",
|
"destination": "{{template_dir}}/Ubuntu2004-README.md",
|
||||||
"direction": "download"
|
"direction": "download"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"scripts":[
|
||||||
|
"{{template_dir}}/scripts/installers/post-deployment.sh"
|
||||||
|
],
|
||||||
|
"environment_vars":[
|
||||||
|
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
|
||||||
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
||||||
|
"IMAGE_FOLDER={{user `image_folder`}}"
|
||||||
|
],
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -316,15 +328,6 @@
|
|||||||
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "shell",
|
|
||||||
"inline": [
|
|
||||||
"rm -rf {{user `helper_script_folder`}}",
|
|
||||||
"rm -rf {{user `installer_script_folder`}}",
|
|
||||||
"chmod 755 {{user `image_folder`}}"
|
|
||||||
],
|
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": "{{template_dir}}/config/ubuntu2004.conf",
|
"source": "{{template_dir}}/config/ubuntu2004.conf",
|
||||||
|
|||||||
Reference in New Issue
Block a user