Fix node_modules references in uptime module.

This commit is contained in:
Rob Vermaas 2013-07-31 13:35:21 +02:00
parent 9cf0a41925
commit 7a32f2d15a

View File

@ -11,7 +11,7 @@ let
ln -sv /var/lib/uptime/runtime.json $out/runtime.json
'' else ''
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
autoStartMonitor: false
@ -69,10 +69,10 @@ in {
environment = {
NODE_CONFIG_DIR = configDir;
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";
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;
@ -85,11 +85,11 @@ in {
environment = {
NODE_CONFIG_DIR = configDir;
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
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";
};
}) ];
}