mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Block Nextcloud from starting if php version is not compatible with installed NC version
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
77fa851391
commit
316ea5a618
1 changed files with 8 additions and 0 deletions
|
|
@ -48,6 +48,14 @@ if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
unset ADMIN_PASSWORD
|
unset ADMIN_PASSWORD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Don't start the container if Nextcloud is not compatible with the PHP version
|
||||||
|
if [ -f "/var/www/html/lib/versioncheck.php" ] && ! php /var/www/html/lib/versioncheck.php; then
|
||||||
|
echo "It seems like your installed Nextcloud is not compatible with the by the container provided PHP version."
|
||||||
|
echo "This most likely happened because you tried to restore an old Nextcloud version from backup that is not compatible with the PHP version that comes with the container."
|
||||||
|
echo "Please try to restore a more recent backup which contains a Nextcloud version that is compatible with the PHP version that comes with the container."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Skip any update if Nextcloud was just restored
|
# Skip any update if Nextcloud was just restored
|
||||||
if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue