Skip to content

Commit e1ce38d

Browse files
authored
PHP 7.1 is required in NC 16 (#820)
1 parent 577a682 commit e1ce38d

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

nextcloud_update.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ update-grub
150150
# Remove update lists
151151
rm /var/lib/apt/lists/* -r
152152

153-
# Nextcloud 13 is required.
154-
lowest_compatible_nc 13
155-
156153
# Fix bug in nextcloud.sh
157154
CURRUSR="$(getent group sudo | cut -d: -f4 | cut -d, -f1)"
158155
if grep -q "6.ifcfg.me" $SCRIPTS/nextcloud.sh &>/dev/null
@@ -194,6 +191,9 @@ then
194191
occ_command app:update --all
195192
fi
196193

194+
# Nextcloud 13 is required.
195+
lowest_compatible_nc 13
196+
197197
# Change simple signup
198198
if grep -rq "free account" "$NCPATH"/core/templates/layout.public.php
199199
then
@@ -210,8 +210,8 @@ Latest release: $NCVERSION
210210
211211
It is best to keep your Nextcloud server upgraded regularly, and to install all point releases
212212
and major releases without skipping any of them, as skipping releases increases the risk of
213-
errors. Major releases are 9, 10, 11 and 12. Point releases are intermediate releases for each
214-
major release. For example, 9.0.52 and 10.0.2 are point releases.
213+
errors. Major releases are 13, 14, 15 and 16. Point releases are intermediate releases for each
214+
major release. For example, 14.0.52 and 15.0.2 are point releases.
215215
216216
Please contact T\&M Hansson IT AB to help you with upgrading between major versions.
217217
https://shop.hanssonit.se/product/upgrade-between-major-owncloud-nextcloud-versions/"
@@ -229,6 +229,20 @@ else
229229
exit 0
230230
fi
231231

232+
# Check if PHP version is compatible with $NCVERSION
233+
PHP_VER=71
234+
NC_VER=16
235+
if [ "${NCVERSION%%.*}" -eq "$NC_VER" ]
236+
then
237+
if [ "$(php -v | head -n 1 | cut -d " " -f 2 | cut -c 1,3)" -lt "$PHP_VER" ]
238+
then
239+
msg_box "Your PHP version isn't compatible with the new version of Nextcloud. Please upgrade your PHP stack and try again.
240+
241+
If you need support, please visit https://shop.hanssonit.se/product/premium-support-per-30-minutes/"
242+
exit
243+
fi
244+
fi
245+
232246
# Upgrade Nextcloud
233247
print_text_in_color "$ICyan" "Checking latest released version on the Nextcloud download server and if it's possible to download..."
234248
if ! curl -fSLO --retry 3 "$NCREPO/$STABLEVERSION.tar.bz2"

0 commit comments

Comments
 (0)