Mercurial > hg > rlgwebd
annotate README.txt @ 192:addc4e3456c4
Begin adding systemd compatibility.
The Makefile can be used to build and install rlgwebd. On systems with
systemd, the unit file controls starting and stopping the service, and
the shell script is not needed.
The unit file uses KillMode=none because socat does not actually stop
rlgwebd, it only asks it to stop and exits without waiting for a
response. Until a better stopping method is introduced, this setting
prevents systemd from killing all the rlgwebd processes as soon as
socat exits.
author | John "Elwin" Edwards |
---|---|
date | Fri, 01 Jan 2016 16:11:34 -0500 |
parents | b5df69715001 |
children | 5041ec1fb426 |
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 --- |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
8 RLGWebD currently works with Node v0.10. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
9 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
10 It requires the 'posix', 'pty.js', and 'websocket' modules. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
11 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
12 Installation |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
13 --- |
151 | 14 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
|
15 some assumptions about the configuration. It expects the dgamelaunch |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
16 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
|
17 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
|
18 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
|
19 patched to prevent it from deleting them. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
20 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
21 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
|
22 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
|
23 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
|
24 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
25 It creates a socket in the filesystem which is used to control the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
26 server. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
27 |
151 | 28 The following files need to be copied into CHROOT/var/www: |
29 about.html | |
30 bell.svg | |
178 | 31 index.html |
151 | 32 options.html |
33 options.js | |
34 rlgterm.js | |
35 style-rlg.css | |
36 termemu.js | |
37 termemu-keys.js | |
38 tty.css | |
39 | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
40 sqlickrypt |
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 RLGWebD uses a separate program written in C to operate on the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
43 dgamelaunch user database. Compile this with: |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
44 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
45 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
46 The binary should be placed in /bin inside the chroot. It requires |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
47 libcrypt and libsqlite3 to be installed in the chroot. Depending on |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
48 your system, these may have other dependencies. Make sure to check by |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
49 running ldd. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
50 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
51 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
|
52 mknod CHROOT/dev/urandom c 1 9 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
53 |
178 | 54 dglwatcher |
55 --- | |
56 RLGWebD uses another C program to monitor the inprogress directories, because | |
57 Node's fs.watch() can't distinguish between file creation and deletion. | |
58 | |
59 Compile with | |
60 cc -o dglwatcher dglwatcher.c | |
61 and copy into CHROOT/bin. | |
62 | |
63 Starting and stopping RLGWebD | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
64 --- |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
65 Run the 'rlgwebd' shell script as root. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
66 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
67 Stop by passing 'stop' as an argument. (This requires socat to be |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
68 installed.) |
151 | 69 |
70 webtty | |
71 --- | |
72 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 | |
74 terminal emulator. Copy index-sh.html to index.html before running it. |