anchor.diff:      --nodaemon --syslog --prefix=${name} --pidfile /run/${name}/${name}.pid ${name}
     '';
   
  -  mkPidFileDir = name: ''
  -    mkdir -p /run/${name}
  -    chmod 0700 /run/${name}
  -    chown -R graphite:graphite /run/${name}
  -  '';
  -
     carbonEnv = {
       PYTHONPATH = let
         cenv = pkgs.python.buildEnv.override {
  
positive.code:         after = [ "network.target" ];
          environment = carbonEnv;
          serviceConfig = {
            ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
            User = "graphite";
            Group = "graphite";
            PIDFile="/run/${name}/${name}.pid";
          };
          preStart = mkPidFileDir name;
        };
      })
  
  
negative.code:         after = [ "network.target" ];
          environment = carbonEnv;
          serviceConfig = {
            RuntimeDirectory = name;
            ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
            User = "graphite";
            Group = "graphite";
            PIDFile="/run/${name}/${name}.pid";
          };
        };
      })
  
  