1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

flarum: fix installation and migration logic

This commit is contained in:
Florian Agbuya 2024-09-12 15:52:09 +08:00
parent 413a052d9d
commit 317a52a757

View file

@ -203,10 +203,13 @@ in {
ln -sf ${cfg.package}/share/php/flarum/public/index.php public/
'' + optionalString (cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
if [ ! -f config.php ]; then
php flarum install --file=${flarumInstallConfig}
php flarum install --file=${flarumInstallConfig}
fi
'' + ''
if [ -f config.php ]; then
php flarum migrate
php flarum cache:clear
fi
php flarum migrate
php flarum cache:clear
'';
};
};