RLGWebD: use NODE_PATH to find modules.
This commit is contained in:
parent
d7df88f3cf
commit
49640d131e
2 changed files with 7 additions and 5 deletions
3
rlgwebd
3
rlgwebd
|
|
@ -1,9 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
NODE_PATH=/usr/lib/node_modules
|
||||||
LOGFILE=/var/local/rlgwebd/log
|
LOGFILE=/var/local/rlgwebd/log
|
||||||
CTLSOCKET=/var/local/rlgwebd/ctl
|
CTLSOCKET=/var/local/rlgwebd/ctl
|
||||||
RLGWEBDJS=./rlgwebd.js
|
RLGWEBDJS=./rlgwebd.js
|
||||||
|
|
||||||
|
export NODE_PATH
|
||||||
|
|
||||||
if [ $UID != 0 ]
|
if [ $UID != 0 ]
|
||||||
then
|
then
|
||||||
echo "$0 needs to run as root." >&2
|
echo "$0 needs to run as root." >&2
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
// If you can't quite trust node to find it on its own
|
|
||||||
var localModules = '/usr/local/lib/node_modules/';
|
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
var url = require('url');
|
var url = require('url');
|
||||||
|
|
@ -9,9 +7,10 @@ var path = require('path');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var events = require('events');
|
var events = require('events');
|
||||||
var child_process = require('child_process');
|
var child_process = require('child_process');
|
||||||
var posix = require(path.join(localModules, "posix"));
|
// Dependencies
|
||||||
var pty = require(path.join(localModules, "pty.js"));
|
var posix = require("posix");
|
||||||
var WebSocketServer = require(path.join(localModules, "websocket")).server;
|
var pty = require("pty.js");
|
||||||
|
var WebSocketServer = require("websocket").server;
|
||||||
|
|
||||||
/* Configuration variables */
|
/* Configuration variables */
|
||||||
// The first file is NOT in the chroot.
|
// The first file is NOT in the chroot.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue