From 79317ed67e4aee0ca5c482f1a877431d487227b4 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Wed, 19 Aug 2015 15:43:34 -0400 Subject: [PATCH] dont run ownCloud's upgrade before it's been installed to remove a noisy message --- setup/owncloud.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup/owncloud.sh b/setup/owncloud.sh index 20df097..fddbb8c 100755 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -66,9 +66,12 @@ if [ ! -d /usr/local/lib/owncloud/ ] \ # that error. chown -f -R www-data.www-data $STORAGE_ROOT/owncloud /usr/local/lib/owncloud - # Run the upgrade script. Then check for success (0=ok, 3=no upgrade needed). - sudo -u www-data php /usr/local/lib/owncloud/occ upgrade - if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then exit 1; fi + # If this isn't a new installation, immediately run the upgrade script. + # Then check for success (0=ok and 3=no upgrade needed, both are success). + if [ -f $STORAGE_ROOT/owncloud/owncloud.db ]; then + sudo -u www-data php /usr/local/lib/owncloud/occ upgrade + if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then exit 1; fi + fi fi # ### Configuring ownCloud