tomcat service: call shutdown in preStop, because postStop is too late (systemd kills process)

This commit is contained in:
danbst 2016-09-07 16:11:15 +00:00 committed by Bjørn Forsman
parent 0c2d943529
commit f1072611a4

View File

@ -352,7 +352,7 @@ in
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${cfg.jdk} JAVA_OPTS="${cfg.javaOpts}" CATALINA_OPTS="${cfg.catalinaOpts}" ${tomcat}/bin/startup.sh'
'';
postStop = ''
preStop = ''
echo "Stopping tomcat..."
CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${cfg.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${tomcat}/bin/shutdown.sh
'';