changeset 197:5041ec1fb426

Update the documentation.
author John "Elwin" Edwards
date Thu, 14 Jan 2016 21:31:23 -0500
parents 298a531776d6
children ea28353d620a
files README.txt
diffstat 1 files changed, 38 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Thu Jan 14 21:30:14 2016 -0500
+++ b/README.txt	Thu Jan 14 21:31:23 2016 -0500
@@ -7,7 +7,25 @@
 ---
 RLGWebD currently works with Node v0.10.
 
-It requires the 'posix', 'pty.js', and 'websocket' modules.
+It requires the 'posix', 'pty.js', and 'websocket' modules.  Currently,
+it expects them to be installed in the global location, which is 
+"/usr/lib/node_modules".  It is planned to eventually use a different
+location so that npm will not need to run as root.
+
+init
+---
+RLGWebD now includes a systemd unit file, which is the recommended way
+to run it.  See below for more instructions.
+
+For other init systems, a shell script is provided.  This is not really
+a proper initscript, but it could form the basis of one.
+
+Configuration
+---
+You can change the location of the chroot, the name of the dgamelaunch
+user, and the port number by editing the first few lines of the rlgwebd
+script.  If you change the chroot location, change it in the Makefile
+too.
 
 Installation
 ---
@@ -22,50 +40,34 @@
 done with a line in /etc/fstab like the following:
 	devpts	CHROOT/dev/pts	devpts	newinstance,ptmxmode=666 0 0
 
-It creates a socket in the filesystem which is used to control the 
-server.
-
-The following files need to be copied into CHROOT/var/www:
-  about.html
-  bell.svg
-  index.html
-  options.html
-  options.js
-  rlgterm.js
-  style-rlg.css
-  termemu.js
-  termemu-keys.js
-  tty.css
-
-sqlickrypt
----
-RLGWebD uses a separate program written in C to operate on the 
-dgamelaunch user database.  Compile this with:
-	cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3
-
-The binary should be placed in /bin inside the chroot.  It requires 
-libcrypt and libsqlite3 to be installed in the chroot.  Depending on 
-your system, these may have other dependencies.  Make sure to check by 
-running ldd.
+RLGWebD uses two separate programs written in C.  sqlickrypt operates
+on the dgamelaunch user database.  dglwatcher monitors the inprogress
+directories.  Run "make" to build both of them.
 
 sqlickrypt needs /dev/urandom to exist in the chroot.  Run as root:
 	mknod CHROOT/dev/urandom c 1 9
 
-dglwatcher
----
-RLGWebD uses another C program to monitor the inprogress directories, because
-Node's fs.watch() can't distinguish between file creation and deletion.
+Running "make install" will:
+  Copy the Web assets into the chroot
+  Copy the C programs and the libraries they need into the chroot
+  Install the main RLGWebD script in /usr/local/bin
+  Place the systemd unit file in the proper directory
 
-Compile with
-	cc -o dglwatcher dglwatcher.c
-and copy into CHROOT/bin.
+If you don't use systemd, or want to change the installation locations,
+you will have to edit the Makefile.
+
+You will still need to run "systemctl enable rlgwebd" to make the 
+server start on boot, and "systemctl start rlgwebd" to make it start
+immediately.
 
 Starting and stopping RLGWebD
 ---
-Run the 'rlgwebd' shell script as root.
+If you are using systemd, "systemctl start" and "systemctl stop" should
+work as with any other service.
 
-Stop by passing 'stop' as an argument.  (This requires socat to be 
-installed.)
+If you are using the initscript, running it with no arguments will 
+start RLGWebD.  Stop by running it with 'stop' as an argument.  (This 
+requires socat to be installed.)
 
 webtty
 ---