diff --git a/Containers/nextcloud/config/aio.config.php b/Containers/nextcloud/config/aio.config.php index 7c80b6ba..497b2cf0 100644 --- a/Containers/nextcloud/config/aio.config.php +++ b/Containers/nextcloud/config/aio.config.php @@ -2,4 +2,5 @@ $CONFIG = array ( 'one-click-instance' => true, 'one-click-instance.user-limit' => 100, + 'update_channel' => 'stable', ); diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 98ebf8d0..61692a28 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -423,6 +423,8 @@ EOF echo "Upgrade to latest major version failed! Check the output above for details." exit 1 fi + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi # AIO update to latest end # Do not remove or change this line! diff --git a/Containers/nextcloud/upgrade-latest-major.sh b/Containers/nextcloud/upgrade-latest-major.sh index 3729e2a4..20fceb89 100644 --- a/Containers/nextcloud/upgrade-latest-major.sh +++ b/Containers/nextcloud/upgrade-latest-major.sh @@ -30,8 +30,6 @@ if ! [ "$INSTALLED_MAJOR" -gt "$IMAGE_MAJOR" ]; then touch "$NEXTCLOUD_DATA_DIR/install.failed" exit 1 fi - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi php /var/www/html/occ config:system:set updatechecker --type=bool --value=true php /var/www/html/occ app:enable nextcloud-aio --force diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 6d27d7b0..5d51a60f 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -14,10 +14,7 @@ use Slim\Psr7\NonBufferedBody; readonly class DockerController { private const string TOP_CONTAINER = 'nextcloud-aio-apache'; - - private function getLatestMajorVersion(): string { - return '33'; - } + private const string LATEST_MAJOR_VERSION = '33'; public function __construct( private DockerActionManager $dockerActionManager, @@ -225,7 +222,7 @@ readonly class DockerController { } if (isset($request->getParsedBody()['install_latest_major'])) { - $installLatestMajor = $this->getLatestMajorVersion(); + $installLatestMajor = self::LATEST_MAJOR_VERSION; } else { $installLatestMajor = ''; } @@ -338,7 +335,7 @@ readonly class DockerController { } public function RunNextcloudUpgradeToLatestMajor(Request $request, Response $response, array $args) : Response { - $this->configurationManager->installLatestMajor = $this->getLatestMajorVersion(); + $this->configurationManager->installLatestMajor = self::LATEST_MAJOR_VERSION; // Get streaming response start and closure $nonbufResp = $this->startStreamingResponse($response);