mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 23:20:55 +00:00
Allows the JDK to be chosen in services.tomcat
This commit is contained in:
parent
bb4d15a115
commit
e27dcfff1b
|
@ -77,6 +77,11 @@ in
|
|||
description = "Whether to enable logging per virtual host.";
|
||||
};
|
||||
|
||||
jdk = mkOption {
|
||||
default = pkgs.jdk;
|
||||
description "Which JDK to use.";
|
||||
}
|
||||
|
||||
axis2 = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -332,13 +337,13 @@ in
|
|||
'';
|
||||
|
||||
script = ''
|
||||
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" CATALINA_OPTS="${cfg.catalinaOpts}" ${tomcat}/bin/startup.sh'
|
||||
${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 =
|
||||
''
|
||||
echo "Stopping tomcat..."
|
||||
CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${tomcat}/bin/shutdown.sh
|
||||
CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${cfg.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${tomcat}/bin/shutdown.sh
|
||||
'';
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue