Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,12 @@ resource "null_resource" "drupal_provisioner_without_bastion" {
inline = [
"chmod +x ${local.php_script}",
"sudo ${local.php_script}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}",
"chmod +x ${local.security_script}",
"sudo ${local.security_script}",
"chmod +x ${local.create_drupal_db}",
"sudo ${local.create_drupal_db}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}"
"sudo ${local.create_drupal_db}"
]

}
Expand Down Expand Up @@ -701,12 +701,12 @@ resource "null_resource" "drupal_provisioner_with_bastion" {
inline = [
"chmod +x ${local.php_script}",
"sudo ${local.php_script}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}",
"chmod +x ${local.security_script}",
"sudo ${local.security_script}",
"chmod +x ${local.create_drupal_db}",
"sudo ${local.create_drupal_db}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}"
"sudo ${local.create_drupal_db}"
]

}
Expand Down Expand Up @@ -847,12 +847,12 @@ resource "null_resource" "drupal_provisioner_with_injected_bastion_server_public
inline = [
"chmod +x ${local.php_script}",
"sudo ${local.php_script}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}",
"chmod +x ${local.security_script}",
"sudo ${local.security_script}",
"chmod +x ${local.create_drupal_db}",
"sudo ${local.create_drupal_db}",
"chmod +x ${local.install_drupal}",
"sudo ${local.install_drupal}"
"sudo ${local.create_drupal_db}"
]

}
Expand Down
14 changes: 8 additions & 6 deletions scripts/install_drupal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ $use_shared_storage == "true" ]]; then
cd ${drupal_shared_working_dir}
else
echo "No mount NFS share. Moving to /var/www/html"
cd /var/www/html
cd /var/www/
fi

wget https://www.drupal.org/download-latest/tar.gz
Expand All @@ -26,10 +26,11 @@ if [[ $use_shared_storage == "true" ]]; then
rm -rf ${drupal_shared_working_dir}/drupal-*
cp ${drupal_shared_working_dir}/sites/default/default.settings.php sites/default/settings.php
else
tar zxvf tar.gz --directory /var/www/html
cp -r /var/www/html/drupal-*/* /var/www/html
rm -rf /var/www/html/drupal-*
cp /var/www/html/sites/default/default.settings.php sites/default/settings.php
tar zxvf tar.gz
rm -rf html/ tar.gz
mv drupal-* html
cd html
cp sites/default/default.settings.php sites/default/settings.php
fi

if [[ $use_shared_storage == "true" ]]; then
Expand All @@ -44,7 +45,8 @@ if [[ $use_shared_storage == "true" ]]; then
rm /home/opc/index.html
chown apache:apache ${drupal_shared_working_dir}/index.html
else
chown apache:apache -R /var/www/html
cd -
chown apache. -R html
sed -i '/AllowOverride None/c\AllowOverride All' /etc/httpd/conf/httpd.conf
fi

Expand Down
4 changes: 2 additions & 2 deletions scripts/install_php74.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ echo "MySQL Shell successfully installed !"

if [[ $(uname -r | sed 's/^.*\(el[0-9]\+\).*$/\1/') == "el8" ]]
then
dnf -y module enable php:remi-7.4
dnf -y module enable php:remi-8.2
dnf -y install php php-cli php-mysqlnd php-zip php-gd php-mcrypt php-mbstring php-xml php-json php-opcache
else
yum-config-manager --enable remi-php74
yum-config-manager --enable remi-php82
yum -y install php php-cli php-mysqlnd php-zip php-gd php-mcrypt php-mbstring php-xml php-json php-opcache
fi

Expand Down