anchor.diff:        };
   
       jobs.zabbix_agent =
  -      { #name = "zabbix-agent"; !!! mkIf bug
  +      { name = "zabbix-agent";
   
           description = "Zabbix agent daemon";
   
  
positive.code:           ''
              mkdir -m 0755 -p ${stateDir} ${logDir}
              chown zabbix ${stateDir} ${logDir}
          
              export PATH=${pkgs.nettools}/bin:$PATH
              ${pkgs.zabbixAgent}/sbin/zabbix_agentd --config ${configFile}
            '';
  
          postStop =
            ''      
              # !!! this seems to leave processes behind.
              #pid=$(cat ${pidFile})
              #if test -n "$pid"; then
              #  kill $pid 
              #fi
  
              # So instead kill the agent in a brutal fashion.
              while ${pkgs.procps}/bin/pkill -u zabbix zabbix_agentd; do true; done
            '';
        };
  
    };
  
  
negative.code:   
        PidFile = ${pidFile}
  
        StartAgents = 1
      '';
  
  in
  