nixos/pixelfed: fix code cache cleanup

The "bootstrap" directory only exists within the app's package.
The cached code is placed at the root of the runtime directory
instead.

(cherry picked from commit d99dd867fb)
This commit is contained in:
pacien
2023-06-17 19:57:29 +02:00
committed by github-actions[bot]
parent 761fa3b4fa
commit b6277a07d1

View File

@@ -380,11 +380,11 @@ in {
};
script = ''
# Before running any PHP program, cleanup the bootstrap.
# Before running any PHP program, cleanup the code cache.
# It's necessary if you upgrade the application otherwise you might
# try to import non-existent modules.
rm -f ${cfg.runtimeDir}/bootstrap/app.php
rm -rf ${cfg.runtimeDir}/bootstrap/cache/*
rm -f ${cfg.runtimeDir}/app.php
rm -rf ${cfg.runtimeDir}/cache/*
# Concatenate non-secret .env and secret .env
rm -f ${cfg.dataDir}/.env