git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/bookstack: use umask before echoing & clear cache before starting
commit336f3607d4bc16d9c421d2dbd4dfa33491a74514 authorYannick Markus <ym@ymarkus.dev> dateTue 13 Apr 2021, 13:58 (6 years ago) parenteae6e08
1 file changed+6−3
nixos/modules/services/web-apps/bookstack.nix+6−3
nixos/modules/services/web-apps/bookstack.nix+6−3
@@ -292,6 +292,8 @@ in {
292292 WorkingDirectory = "${bookstack}";
293293 };
294294 script = ''
295+ # set permissions
296+ umask 077
295297 # create .env file
296298 echo "
297299 APP_KEY=base64:$(head -n1 ${cfg.appKeyFile})
@@ -317,13 +319,14 @@ in {
317319 ${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "SESSION_SECURE_COOKIE=true"}
318320 ${toString cfg.extraConfig}
319321 " > "${cfg.dataDir}/.env"
320− # set permissions
321− chmod 700 "${cfg.dataDir}/.env"
322322
323323 # migrate db
324324 ${pkgs.php}/bin/php artisan migrate --force
325325
326− # create caches
326+ # clear & create caches (needed in case of update)
327+ ${pkgs.php}/bin/php artisan cache:clear
328+ ${pkgs.php}/bin/php artisan config:clear
329+ ${pkgs.php}/bin/php artisan view:clear
327330 ${pkgs.php}/bin/php artisan config:cache
328331 ${pkgs.php}/bin/php artisan route:cache
329332 ${pkgs.php}/bin/php artisan view:cache