How to make occ understand app commands before first initialization

Hi all,

I have scripted a nextcloud install up to the point where initialization of the db has not happened yet, and there is not yet a config.php

  1. At this point the occ commands does not yet ‘understand’ app:install and app:enable. How to overcome this pls?

  2. If the first initialization of the DB and config.php are requird for occ to understand app commands and more, How to force the first initialization from occ /shell pls?

TIA

In case you can read ansible:

If not. This {{ nc_db }} are variables you have to change to your need. Line 61 means, that this command is only run if config.php doesn’t exisist.

So in bash - i belive - it’s something like [ -f …/config.php ] || sudo … occ …

Many thanks, just had another read of the NC docs and indeed, your snipper reffers to: php occ maintenance:install which is key to finish the initial install. On it!

Thanks again!