anchor.diff:  	    chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/webapps
   
   	    # Symlink all the given common libs files or paths into the lib/ directory
  -	    for i in ${pkgs.tomcat6} ${toString cfg.commonLibs}
  +	    for i in ${tomcat} ${toString cfg.commonLibs}
   	    do
   		if [ -f $i ]
   		then
  
positive.code: 		''
  	    else ""}
  
              ${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}" ${pkgs.tomcat6}/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 ${pkgs.tomcat6}/bin/shutdown.sh
            '';
  
        };
  
negative.code: let
  
    cfg = config.services.tomcat;
    tomcat = pkgs.tomcat6;
  in
  
  {
  