Move the NODE_PATH location.

Modules are now expected to be in /var/local/lib/node_modules.  This is
intended to make it easier to avoid running npm as root.
This commit is contained in:
John "Elwin" Edwards 2017-12-26 13:23:55 -05:00
parent 4059bf2983
commit 4940bf86ae
3 changed files with 9 additions and 12 deletions

View file

@ -8,9 +8,8 @@ Node
RLGWebD currently works with Node v0.10. RLGWebD currently works with Node v0.10.
It requires the 'posix', 'pty.js', and 'websocket' modules. Currently, It requires the 'posix', 'pty.js', and 'websocket' modules. Currently,
it expects them to be installed in the global location, which is it expects them to be installed in "/var/local/lib/node_modules". It
"/usr/lib/node_modules". It is planned to eventually use a different is not recommended to run npm as root when installing the modules.
location so that npm will not need to run as root.
init init
--- ---
@ -22,14 +21,11 @@ a proper initscript, but it could form the basis of one.
Configuration Configuration
--- ---
You can set some options by changing some variables in the first few A configuration file is installed at /etc/rlgwebd.conf. It contains a
lines of the rlgwebd script: list of options.
Option Variable Default If the domain_name option and the SSL-related options are set, rlgwebd
will use HTTPS instead of insecure HTTP.
Chroot path chrootDir /var/dgl
Username dropToUser rodney
Server port httpPort 8080
If you change the chroot location, change it in the first line of the If you change the chroot location, change it in the first line of the
Makefile too. Makefile too.
@ -59,6 +55,7 @@ Running "make install" will:
Copy the C programs and the libraries they need into the chroot Copy the C programs and the libraries they need into the chroot
Install the main RLGWebD script in /usr/local/bin Install the main RLGWebD script in /usr/local/bin
Place the systemd unit file in the proper directory Place the systemd unit file in the proper directory
Copy a configuration file into /etc
If you don't use systemd, or want to change the installation locations, If you don't use systemd, or want to change the installation locations,
you will have to edit the Makefile. you will have to edit the Makefile.

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
NODE_PATH=/usr/lib/node_modules NODE_PATH=/var/local/lib/node_modules
LOGFILE=/var/log/rlgwebd.log LOGFILE=/var/log/rlgwebd.log
CTLSOCKET=/var/run/rlgwebd/rlgwebd.sock CTLSOCKET=/var/run/rlgwebd/rlgwebd.sock
RLGWEBDJS=/usr/local/bin/rlgwebd RLGWEBDJS=/usr/local/bin/rlgwebd

View file

@ -4,7 +4,7 @@ After=network.target syslog.target
[Service] [Service]
Type=simple Type=simple
Environment=NODE_PATH=/usr/lib/node_modules Environment=NODE_PATH=/var/local/lib/node_modules
ExecStart=/usr/local/bin/rlgwebd ExecStart=/usr/local/bin/rlgwebd
ExecStop=/usr/local/bin/rlgwebd-stop ExecStop=/usr/local/bin/rlgwebd-stop
Restart=on-failure Restart=on-failure