anchor.diff:          serviceConfig = {
             ExecStart = "${mongodb}/bin/mongod --quiet --config ${mongoCnf}";
             User = cfg.user;
  +          PIDFile = cfg.pidFile;
  +          Type = "forking";
  +          TimeoutStartSec=120; # intial creating of journal can take some time
  +          PermissionsStartOnly = true;
           };
  +
  +        preStart = ''
  +          if ! test -e ${cfg.dbpath}; then
  +              install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
  +          fi
  +          if ! test -e ${cfg.pidFile}; then
  +              install -D -o ${cfg.user} /dev/null ${cfg.pidFile}
  +          fi
  +        '';
         };
   
     };
  
positive.code:           If this instance is part of a replica set, set its name here.
            Otherwise, leave empty to run as single node.
          '';
        };
      };
  
  
negative.code:     bind_ip = ${cfg.bind_ip}
      ${optionalString cfg.quiet "quiet = true"}
      dbpath = ${cfg.dbpath}
      syslog = true
      fork = true
      pidfilepath = ${cfg.pidFile}
      ${optionalString (cfg.replSetName != "") "replSet = ${cfg.replSetName}"}
      ${cfg.extraConfig}
    '';
  
  in
  