[Pkg-owncloud-commits] [owncloud] 32/38: Run upgrade script with sudo as www-data user

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:16:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit dab9a038f3dc271294a5cfe8df6337fa60e1e423
Author: David Prévot <taffit at debian.org>
Date:   Mon Feb 16 16:14:35 2015 -0400

    Run upgrade script with sudo as www-data user
---
 debian/control  | 1 +
 debian/postinst | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 648f02b..09043bc 100644
--- a/debian/control
+++ b/debian/control
@@ -49,6 +49,7 @@ Depends: apache2 | httpd,
          php5-gd,
          php5-json,
          php5-mysql | php5-pgsql | php5-sqlite,
+         sudo,
          zendframework,
          ${misc:Depends}
 Recommends: exim4 | mail-transport-agent,
diff --git a/debian/postinst b/debian/postinst
index f356c8d..a554ebd 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -51,7 +51,7 @@ case "$1" in
 	# Update the database on upgrade
 	# Don’t let it fail, since it exits with 3 if no upgrade is necessary
 	if [ -e /etc/owncloud/config.php ] ; then
-		occ upgrade || true
+		sudo -u www-data occ upgrade || true
 	fi
     ;;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list