summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/tomcat.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix
index b5eee8f8be8f..1de3d40165e9 100644
--- a/nixos/modules/services/web-servers/tomcat.nix
+++ b/nixos/modules/services/web-servers/tomcat.nix
@@ -119,6 +119,8 @@ in
         startOn = "started network-interfaces";
         stopOn = "stopping network-interfaces";
 
+        daemonType = "daemon";
+
         preStart =
           ''
             # Create the base directory
@@ -327,9 +329,11 @@ in
                 done
                 ''
             else ""}
+          '';
 
+        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'
-          '';
+        '';
 
         postStop =
           ''