anchor.diff:          The value <literal>daemon</literal> means that the daemon will
           fork twice.  The value <literal>stop</literal> means that the
           daemon will raise the SIGSTOP signal to indicate readiness.
  +      '';
  +    };
  +
  +    setuid = mkOption {
  +      type = types.string;
  +      check = userExists;
  +      default = "";
  +      description = ''
  +        Run the daemon as a different user.
  +      '';
  +    };
  +
  +    setgid = mkOption {
  +      type = types.string;
  +      check = groupExists;
  +      default = "";
  +      description = ''
  +        Run the daemon as a different group.
         '';
       };
   
  
positive.code: 
    upstart = pkgs.upstart;
  
  
    # From a job description, generate an Upstart job file.
    makeJob = job:
  
negative.code:     # do status queries.
      services.dbus.packages = [ upstart ];
  
      system.activationScripts.chownJobLogs = stringAfter ["var"] 
      (concatMapStrings (job: ''
        touch /var/log/upstart/${job.name}
        ${optionalString (job.setuid != "") "chown ${job.setuid} /var/log/upstart/${job.name}"}
        ${optionalString (job.setgid != "") "chown :${job.setgid} /var/log/upstart/${job.name}"}
      '') (attrValues config.jobs));
  
    };
  
  }
  