Remove roundcube sessions on boot

This commit is contained in:
Daniel Frank 2019-06-17 23:06:07 +02:00
parent a39c6f7c27
commit e70cd7e30d
Signed by: tokudan
GPG key ID: 063CCCAD04182D32

View file

@ -101,14 +101,6 @@ in
${pkgs.sqlite}/bin/sqlite "${config.variables.roundcubeDataDir}/roundcube.sqlite" "DELETE FROM session;"
fi
'';
serviceConfig.ExecStop = pkgs.writeScript "roundcube-delete-sessions" ''
#!${pkgs.stdenv.shell}
set -euo pipefail
if [ -s "${config.variables.roundcubeDataDir}/roundcube.sqlite" ]; then
# Just go ahead and remove the sessions on shutdown.
${pkgs.sqlite}/bin/sqlite "${config.variables.roundcubeDataDir}/roundcube.sqlite" "DELETE FROM session;"
fi
'';
};
services.phpfpm.pools."${poolName}" = {
listen = config.variables.roundcubePhpfpmHostPort;