aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-10-17 11:55:17 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-10-17 11:55:17 -0200
commit6e94d6104239cb8ad1f64cee7079d086d59acc2d (patch)
tree2a3ed72e2bc8536307a0212c992061b85146cba0
parent1e7aed980ae5d01762e7814ff009501533aac722 (diff)
downloadpuppet-drupal-6e94d6104239cb8ad1f64cee7079d086d59acc2d.tar.gz
puppet-drupal-6e94d6104239cb8ad1f64cee7079d086d59acc2d.tar.bz2
Use drupal user in the script
-rwxr-xr-xfiles/drupal16
1 files changed, 8 insertions, 8 deletions
diff --git a/files/drupal b/files/drupal
index 1dbc2d7..3ab2039 100755
--- a/files/drupal
+++ b/files/drupal
@@ -99,13 +99,13 @@ function drupal_iterate {
done
# Fix permissions
- chown -R root.root $base/modules
- chown -R root.root $base/themes
+ chown -R drupal.drupal $base/modules
+ chown -R drupal.drupal $base/themes
if [ -e "$base/sites/all/modules" ]; then
- chown -R root.root $base/sites/all/modules
+ chown -R drupal.drupal $base/sites/all/modules
fi
if [ -e "$base/sites/all/themes" ]; then
- chown -R root.root $base/sites/all/themes
+ chown -R drupal.drupal $base/sites/all/themes
fi
done
}
@@ -152,7 +152,7 @@ function drupal_download {
# Deploy a fresh drupal tree
wget http://ftp.drupal.org/files/projects/drupal-$new.tar.gz
tar zxvf drupal-$new.tar.gz && rm drupal-$new.tar.gz
- chown -R root.root drupal-$new/
+ chown -R drupal.drupal drupal-$new/
# Upgrade mode, erase sites folder as the previous should be copied.
if [ "$2" == "--upgrade" ]; then
@@ -351,10 +351,10 @@ EOF
# Fix permissions
if grep -qe "^$site:" /etc/passwd; then
- chown root.$site $SITES/$site/drupal/settings.php
- chown $site.$site $SITES/$site/drupal/{files,themes,modules,libraries}
+ chown drupal.$site $SITES/$site/drupal/settings.php
+ chown $site.$site $SITES/$site/drupal/{files,themes,modules,libraries}
else
- chown root.www-data $SITES/$site/drupal/settings.php
+ chown drupal.www-data $SITES/$site/drupal/settings.php
chown www-data.www-data $SITES/$site/drupal/{files,themes,modules,libraries}
fi