Mein PR musste leider revertet werden: https://github.com/nextcloud/updater/pull/540
Ich habe mir aber nochmal ein paar Gedanken gemacht und bin doch zu einer Lösung gekommen.
Es gibt die Möglichkeit die Environment-Variable NEXTCLOUD_CONFIG_DIR mitzugeben. Mit dieser kann man den Pfad überschreiben, in dem das Update-Script nach der config.php sucht.
Ich habe also einfach im config-Verzeichnis einen Unterordner "updater" angelegt und dort folgende config.php erstellt:
<?php
$configDir = __DIR__ . '/..';
$configFiles = [$configDir . '/config.php'];
$extraConfigFiles = glob($configDir . '/*.config.php');
natsort($extraConfigFiles);
$configFiles = array_merge($configFiles, $extraConfigFiles);
foreach ($configFiles as $configFile) {
require_once $configFile;
}
Alles anzeigen
Der Cron-Job oder Aufruf über die CLI sieht dann so aus:
NEXTCLOUD_CONFIG_DIR=/httpdocs/cloud.hostingXXXXXX.aXXXX.netcup.net/config/updater /usr/local/php82/bin/php /httpdocs/cloud.hostingXXXXXX.aXXXX.netcup.net/updater/updater.phar --no-interaction
Natürlich müssen die Pfade und die PHP-Version entsprechend der eigenen Installation angepasst werden.
Ich denke das ist erstmal ein stabiler Workaround.
Ich habe damit allerdings noch kein Update durchgeführt. Die Ausgabe sieht aber ok aus:
Current version is 28.0.4.
No update available.
Nothing to do.
Wäre das etwas für https://github.com/froonix/webhosting-mods KB19?