Fix node_modules references in uptime module.
This commit is contained in:
parent
9cf0a41925
commit
7a32f2d15a
@ -11,7 +11,7 @@ let
|
|||||||
ln -sv /var/lib/uptime/runtime.json $out/runtime.json
|
ln -sv /var/lib/uptime/runtime.json $out/runtime.json
|
||||||
'' else ''
|
'' else ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cat ${pkgs.nodePackages.node-uptime}/node_modules/node-uptime/config/default.yaml > $out/default.yaml
|
cat ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/config/default.yaml > $out/default.yaml
|
||||||
cat >> $out/default.yaml <<EOF
|
cat >> $out/default.yaml <<EOF
|
||||||
|
|
||||||
autoStartMonitor: false
|
autoStartMonitor: false
|
||||||
@ -69,10 +69,10 @@ in {
|
|||||||
environment = {
|
environment = {
|
||||||
NODE_CONFIG_DIR = configDir;
|
NODE_CONFIG_DIR = configDir;
|
||||||
NODE_ENV = cfg.nodeEnv;
|
NODE_ENV = cfg.nodeEnv;
|
||||||
NODE_PATH = "${pkgs.nodePackages.node-uptime}/node_modules/node-uptime/node_modules";
|
NODE_PATH = "${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/node_modules";
|
||||||
};
|
};
|
||||||
preStart = "mkdir -p /var/lib/uptime";
|
preStart = "mkdir -p /var/lib/uptime";
|
||||||
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/node_modules/node-uptime/app.js";
|
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/app.js";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mongodb.enable = mkIf (!cfg.usesRemoteMongo) true;
|
services.mongodb.enable = mkIf (!cfg.usesRemoteMongo) true;
|
||||||
@ -85,11 +85,11 @@ in {
|
|||||||
environment = {
|
environment = {
|
||||||
NODE_CONFIG_DIR = configDir;
|
NODE_CONFIG_DIR = configDir;
|
||||||
NODE_ENV = cfg.nodeEnv;
|
NODE_ENV = cfg.nodeEnv;
|
||||||
NODE_PATH = "${pkgs.nodePackages.node-uptime}/node_modules/node-uptime/node_modules";
|
NODE_PATH = "${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/node_modules";
|
||||||
};
|
};
|
||||||
# Ugh, need to wait for web service to be up
|
# Ugh, need to wait for web service to be up
|
||||||
preStart = if cfg.enableWebService then "sleep 1s" else "mkdir -p /var/lib/uptime";
|
preStart = if cfg.enableWebService then "sleep 1s" else "mkdir -p /var/lib/uptime";
|
||||||
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/node_modules/node-uptime/monitor.js";
|
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/monitor.js";
|
||||||
};
|
};
|
||||||
}) ];
|
}) ];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user