[Pkg-owncloud-commits] [owncloud] 01/01: Simply use su instead of sudo in postinst

David Prévot taffit at moszumanska.debian.org
Mon Apr 13 04:29:16 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 12396efa2cf6abceb9bdaff0f03b28af2c676767
Author: David Prévot <taffit at debian.org>
Date:   Sun Apr 12 11:56:31 2015 -0400

    Simply use su instead of sudo in postinst
---
 debian/control  | 1 -
 debian/postinst | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 31033f3..c7b6231 100644
--- a/debian/control
+++ b/debian/control
@@ -50,7 +50,6 @@ 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 a554ebd..e3a663f 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
-		sudo -u www-data occ upgrade || true
+		su -s /bin/sh -c "/usr/sbin/occ upgrade" www-data || 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