Mercurial > hg > rlgwebd
annotate README.txt @ 213:08665c56c6a0 default tip
Fix race condition related to watching DGL games.
It's possible for a dgamelaunch game to end and cause rlgwebd to stop watching
it before rlgwebd has started watching it.
author | John "Elwin" Edwards |
---|---|
date | Sun, 16 Aug 2020 20:56:18 -0400 |
parents | b04313038a0b |
children |
rev | line source |
---|---|
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
1 ===== RLGWebD ===== |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
2 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
3 RLGWebD is a node.js app that enables playing roguelike games in the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
4 browser. It is intended to be compatible with dgamelaunch. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
5 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
6 Node |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
7 --- |
210
b04313038a0b
Changes for compatibility with recent versions of NodeJS.
John "Elwin" Edwards
parents:
209
diff
changeset
|
8 RLGWebD is currently being updated to work with Node v10.x. |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
9 |
210
b04313038a0b
Changes for compatibility with recent versions of NodeJS.
John "Elwin" Edwards
parents:
209
diff
changeset
|
10 It requires the 'posix', 'node-pty', and 'websocket' modules. Currently, |
209 | 11 it expects them to be installed in "/var/local/lib/node_modules". It |
12 is not recommended to run npm as root when installing the modules. | |
197 | 13 |
14 init | |
15 --- | |
16 RLGWebD now includes a systemd unit file, which is the recommended way | |
17 to run it. See below for more instructions. | |
18 | |
19 For other init systems, a shell script is provided. This is not really | |
20 a proper initscript, but it could form the basis of one. | |
21 | |
22 Configuration | |
23 --- | |
209 | 24 A configuration file is installed at /etc/rlgwebd.conf. It contains a |
25 list of options. | |
199 | 26 |
209 | 27 If the domain_name option and the SSL-related options are set, rlgwebd |
28 will use HTTPS instead of insecure HTTP. | |
199 | 29 |
30 If you change the chroot location, change it in the first line of the | |
31 Makefile too. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
32 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
33 Installation |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
34 --- |
151 | 35 RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
36 some assumptions about the configuration. It expects the dgamelaunch |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
37 playground to be at /dgldir inside the chroot. It expects the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
38 in-progress files to be in /dgldir/inprogress/<gamename>. RLGWebD |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
39 creates in-progress files in those locations, and dgamelaunch must be |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
40 patched to prevent it from deleting them. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
41 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
42 It needs the devpts filesystem mounted inside the chroot. This can be |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
43 done with a line in /etc/fstab like the following: |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
44 devpts CHROOT/dev/pts devpts newinstance,ptmxmode=666 0 0 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
45 |
197 | 46 RLGWebD uses two separate programs written in C. sqlickrypt operates |
47 on the dgamelaunch user database. dglwatcher monitors the inprogress | |
48 directories. Run "make" to build both of them. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
49 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
50 sqlickrypt needs /dev/urandom to exist in the chroot. Run as root: |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
51 mknod CHROOT/dev/urandom c 1 9 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
52 |
197 | 53 Running "make install" will: |
54 Copy the Web assets into the chroot | |
55 Copy the C programs and the libraries they need into the chroot | |
56 Install the main RLGWebD script in /usr/local/bin | |
57 Place the systemd unit file in the proper directory | |
209 | 58 Copy a configuration file into /etc |
178 | 59 |
197 | 60 If you don't use systemd, or want to change the installation locations, |
61 you will have to edit the Makefile. | |
62 | |
63 You will still need to run "systemctl enable rlgwebd" to make the | |
64 server start on boot, and "systemctl start rlgwebd" to make it start | |
65 immediately. | |
178 | 66 |
67 Starting and stopping RLGWebD | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
68 --- |
197 | 69 If you are using systemd, "systemctl start" and "systemctl stop" should |
70 work as with any other service. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
71 |
197 | 72 If you are using the initscript, running it with no arguments will |
73 start RLGWebD. Stop by running it with 'stop' as an argument. (This | |
74 requires socat to be installed.) | |
151 | 75 |
76 webtty | |
77 --- | |
199 | 78 "webtty" is a Node app which uses the terminal emulator to run a shell. It |
151 | 79 includes NO SECURITY WHATSOEVER and should only be used for testing the |
80 terminal emulator. Copy index-sh.html to index.html before running it. | |
199 | 81 |
82 Copyright status | |
83 --- | |
84 All files in this project are in the public domain. |