@@ -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