From 3b97570118af567c8c2415b35ae40e1ff5b5fbd3 Mon Sep 17 00:00:00 2001 From: macmeck Date: Thu, 20 Apr 2017 03:48:28 +0200 Subject: [PATCH] check for installed Nextcloud to allow container restart before installation (#173) --- nextcloud/daily/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nextcloud/daily/run.sh b/nextcloud/daily/run.sh index 79c079b..db851d8 100644 --- a/nextcloud/daily/run.sh +++ b/nextcloud/daily/run.sh @@ -32,14 +32,16 @@ if [ ! -f /config/config.php ]; then # New installation, run the setup /usr/local/bin/setup.sh else + if [ $(occ | head -n 1 | grep -ic "Nextcloud version.*") == "1" ] ; then occ upgrade if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then - echo "Trying ownCloud upgrade again to work around ownCloud upgrade bug..." + echo "Trying Nextcloud upgrade again to work around Nextcloud upgrade bug..." occ upgrade if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then exit 1; fi occ maintenance:mode --off echo "...which seemed to work." fi + fi fi exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d