nextcloud: expose occ binary via $OCC_BIN in nextcloud-setup service script (#458456)

This commit is contained in:
Maximilian Bosch
2025-11-08 15:29:24 +00:00
committed by GitHub

View File

@@ -1235,6 +1235,8 @@ in
path = [ occ ]; path = [ occ ];
restartTriggers = [ overrideConfig ]; restartTriggers = [ overrideConfig ];
script = '' script = ''
export OCC_BIN="${lib.getExe occ}"
${lib.optionalString (c.dbpassFile != null) '' ${lib.optionalString (c.dbpassFile != null) ''
if [ -z "$(<"$CREDENTIALS_DIRECTORY/dbpass")" ]; then if [ -z "$(<"$CREDENTIALS_DIRECTORY/dbpass")" ]; then
echo "dbpassFile ${c.dbpassFile} is empty!" echo "dbpassFile ${c.dbpassFile} is empty!"
@@ -1275,13 +1277,13 @@ in
${occInstallCmd} ${occInstallCmd}
fi fi
${lib.getExe occ} upgrade $OCC_BIN upgrade
${lib.getExe occ} config:system:delete trusted_domains $OCC_BIN config:system:delete trusted_domains
${lib.optionalString (cfg.extraAppsEnable && cfg.extraApps != { }) '' ${lib.optionalString (cfg.extraAppsEnable && cfg.extraApps != { }) ''
# Try to enable apps # Try to enable apps
${lib.getExe occ} app:enable ${lib.concatStringsSep " " (lib.attrNames cfg.extraApps)} $OCC_BIN app:enable ${lib.concatStringsSep " " (lib.attrNames cfg.extraApps)}
''} ''}
${occSetTrustedDomainsCmd} ${occSetTrustedDomainsCmd}