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

David Prévot taffit at moszumanska.debian.org
Wed Apr 1 04:29:07 UTC 2015


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

taffit pushed a commit to branch jessie
in repository owncloud.

commit d3a9efb4b0a7b3f9320183ee1fd9be6eb4837f77
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 193fed7..f10a327 100644
--- a/debian/control
+++ b/debian/control
@@ -47,6 +47,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