]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Use drupal user in the script
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 17 Oct 2016 13:55:17 +0000 (11:55 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 17 Oct 2016 13:55:17 +0000 (11:55 -0200)
files/drupal

index 1dbc2d7dc57726752270d906bd1b982855771c06..3ab203957e3de7a21c32ab1b0998d4dd793090f4 100755 (executable)
@@ -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