Mercurial > hg > rlgwebd
comparison README.txt @ 197:5041ec1fb426
Update the documentation.
| author | John "Elwin" Edwards |
|---|---|
| date | Thu, 14 Jan 2016 21:31:23 -0500 |
| parents | b5df69715001 |
| children | 34e1bc4fd6b2 |
comparison
equal
deleted
inserted
replaced
| 196:298a531776d6 | 197:5041ec1fb426 |
|---|---|
| 5 | 5 |
| 6 Node | 6 Node |
| 7 --- | 7 --- |
| 8 RLGWebD currently works with Node v0.10. | 8 RLGWebD currently works with Node v0.10. |
| 9 | 9 |
| 10 It requires the 'posix', 'pty.js', and 'websocket' modules. | 10 It requires the 'posix', 'pty.js', and 'websocket' modules. Currently, |
| 11 it expects them to be installed in the global location, which is | |
| 12 "/usr/lib/node_modules". It is planned to eventually use a different | |
| 13 location so that npm will not need to run as root. | |
| 14 | |
| 15 init | |
| 16 --- | |
| 17 RLGWebD now includes a systemd unit file, which is the recommended way | |
| 18 to run it. See below for more instructions. | |
| 19 | |
| 20 For other init systems, a shell script is provided. This is not really | |
| 21 a proper initscript, but it could form the basis of one. | |
| 22 | |
| 23 Configuration | |
| 24 --- | |
| 25 You can change the location of the chroot, the name of the dgamelaunch | |
| 26 user, and the port number by editing the first few lines of the rlgwebd | |
| 27 script. If you change the chroot location, change it in the Makefile | |
| 28 too. | |
| 11 | 29 |
| 12 Installation | 30 Installation |
| 13 --- | 31 --- |
| 14 RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes | 32 RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes |
| 15 some assumptions about the configuration. It expects the dgamelaunch | 33 some assumptions about the configuration. It expects the dgamelaunch |
| 20 | 38 |
| 21 It needs the devpts filesystem mounted inside the chroot. This can be | 39 It needs the devpts filesystem mounted inside the chroot. This can be |
| 22 done with a line in /etc/fstab like the following: | 40 done with a line in /etc/fstab like the following: |
| 23 devpts CHROOT/dev/pts devpts newinstance,ptmxmode=666 0 0 | 41 devpts CHROOT/dev/pts devpts newinstance,ptmxmode=666 0 0 |
| 24 | 42 |
| 25 It creates a socket in the filesystem which is used to control the | 43 RLGWebD uses two separate programs written in C. sqlickrypt operates |
| 26 server. | 44 on the dgamelaunch user database. dglwatcher monitors the inprogress |
| 27 | 45 directories. Run "make" to build both of them. |
| 28 The following files need to be copied into CHROOT/var/www: | |
| 29 about.html | |
| 30 bell.svg | |
| 31 index.html | |
| 32 options.html | |
| 33 options.js | |
| 34 rlgterm.js | |
| 35 style-rlg.css | |
| 36 termemu.js | |
| 37 termemu-keys.js | |
| 38 tty.css | |
| 39 | |
| 40 sqlickrypt | |
| 41 --- | |
| 42 RLGWebD uses a separate program written in C to operate on the | |
| 43 dgamelaunch user database. Compile this with: | |
| 44 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3 | |
| 45 | |
| 46 The binary should be placed in /bin inside the chroot. It requires | |
| 47 libcrypt and libsqlite3 to be installed in the chroot. Depending on | |
| 48 your system, these may have other dependencies. Make sure to check by | |
| 49 running ldd. | |
| 50 | 46 |
| 51 sqlickrypt needs /dev/urandom to exist in the chroot. Run as root: | 47 sqlickrypt needs /dev/urandom to exist in the chroot. Run as root: |
| 52 mknod CHROOT/dev/urandom c 1 9 | 48 mknod CHROOT/dev/urandom c 1 9 |
| 53 | 49 |
| 54 dglwatcher | 50 Running "make install" will: |
| 55 --- | 51 Copy the Web assets into the chroot |
| 56 RLGWebD uses another C program to monitor the inprogress directories, because | 52 Copy the C programs and the libraries they need into the chroot |
| 57 Node's fs.watch() can't distinguish between file creation and deletion. | 53 Install the main RLGWebD script in /usr/local/bin |
| 54 Place the systemd unit file in the proper directory | |
| 58 | 55 |
| 59 Compile with | 56 If you don't use systemd, or want to change the installation locations, |
| 60 cc -o dglwatcher dglwatcher.c | 57 you will have to edit the Makefile. |
| 61 and copy into CHROOT/bin. | 58 |
| 59 You will still need to run "systemctl enable rlgwebd" to make the | |
| 60 server start on boot, and "systemctl start rlgwebd" to make it start | |
| 61 immediately. | |
| 62 | 62 |
| 63 Starting and stopping RLGWebD | 63 Starting and stopping RLGWebD |
| 64 --- | 64 --- |
| 65 Run the 'rlgwebd' shell script as root. | 65 If you are using systemd, "systemctl start" and "systemctl stop" should |
| 66 work as with any other service. | |
| 66 | 67 |
| 67 Stop by passing 'stop' as an argument. (This requires socat to be | 68 If you are using the initscript, running it with no arguments will |
| 68 installed.) | 69 start RLGWebD. Stop by running it with 'stop' as an argument. (This |
| 70 requires socat to be installed.) | |
| 69 | 71 |
| 70 webtty | 72 webtty |
| 71 --- | 73 --- |
| 72 webtty.js is a Node app which uses the terminal emulator to run a shell. It | 74 webtty.js is a Node app which uses the terminal emulator to run a shell. It |
| 73 includes NO SECURITY WHATSOEVER and should only be used for testing the | 75 includes NO SECURITY WHATSOEVER and should only be used for testing the |
