Fix MongoDB on sysvinit
This commit is contained in:
parent
0dc527821e
commit
513e3b226a
|
@ -108,12 +108,12 @@ in
|
|||
};
|
||||
|
||||
mongodb = import ./mongodb {
|
||||
inherit createManagedProcess runtimeDir;
|
||||
inherit createManagedProcess tmpDir;
|
||||
inherit (pkgs) mongodb;
|
||||
};
|
||||
|
||||
simpleMongodb = import ./mongodb/simplemongodb.nix {
|
||||
inherit createManagedProcess runtimeDir stateDir forceDisableUserChange;
|
||||
inherit createManagedProcess tmpDir stateDir forceDisableUserChange;
|
||||
inherit (pkgs) lib mongodb writeTextFile;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, mongodb, runtimeDir}:
|
||||
{createManagedProcess, mongodb, tmpDir}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "mongodb${instanceSuffix}"
|
||||
|
@ -10,13 +10,14 @@
|
|||
let
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
pidFile = "${tmpDir}/${instanceName}.pid";
|
||||
in
|
||||
createManagedProcess {
|
||||
inherit instanceName initialize postInstall;
|
||||
inherit instanceName initialize pidFile postInstall;
|
||||
|
||||
process = "${mongodb}/bin/mongod";
|
||||
args = [ "--config" configFile ];
|
||||
daemonExtraArgs = [ "--fork" "--pidfilepath" "${runtimeDir}/${instanceName}.pid" ];
|
||||
daemonExtraArgs = [ "--fork" "--pidfilepath" pidFile ];
|
||||
user = instanceName;
|
||||
|
||||
credentials = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, lib, writeTextFile, mongodb, runtimeDir, stateDir, forceDisableUserChange}:
|
||||
{createManagedProcess, lib, writeTextFile, mongodb, tmpDir, stateDir, forceDisableUserChange}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "mongodb${instanceSuffix}"
|
||||
|
@ -13,7 +13,7 @@ let
|
|||
group = instanceName;
|
||||
in
|
||||
import ./default.nix {
|
||||
inherit createManagedProcess mongodb runtimeDir;
|
||||
inherit createManagedProcess mongodb tmpDir;
|
||||
} {
|
||||
inherit instanceName postInstall;
|
||||
configFile = writeTextFile {
|
||||
|
|
Loading…
Reference in New Issue