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

David Prévot taffit at moszumanska.debian.org
Mon Apr 13 04:29:13 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 21df003f789e5621ab754b2347af4c865cf201bf
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 8b79bb2..abfa45a 100644
--- a/debian/control
+++ b/debian/control
@@ -48,7 +48,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