Setup Guide for running BottleChat forum under Gophernicus
Prerequisites:
- gophernicus server running with *scripting* and *http-style queries* enabled, also *personal gopherspaces* should be enabled if running under `~/public_gopher/`. Because gophernicus is typically installed as an *inetd(8)* network service it may not show up using *ps(1)* or *pgrep(1)*; if possible, check its `/etc/inetd.conf` entry for what options gophernicus is running with. The *sockstat(8)* command may also be useful.
- a suitable AWK variant installed and runnable by gophernicus; AWKs known to work: *NetBSD awk, nawk[1], mawk, gawk*.
[1] lacks internal time functions; use `time()` and `date()`
Setup:
- select a directory servable by Gophernicus; standard locations are under either `/var/gopher/` or `~/public_gopher/` :
$ cd ~/public_gopher
- copy script to ./gophermap:
$ cp ../bottlechat.awk ./gophermap
$ touch ./ledger.txt
- set appropriate ownership and permissions:
$ chown your_uid:nobody gophermap ledger.txt
$ chmod 755 gophermap
$ chmod 666 ledger.txt
$ ls -l gophermap ledger.txt
-rwxr-xr-x 1 your_uid nobody 3622 Feb 10 12:14 gophermap
-rw-rw-r-- 1 your_uid nobody 2204 Feb 12 18:18 ledger.txt
- verify working directory permissions:
$ ls -ld ../
drwxr-xr-x 3 your_uid users 512 Feb 12 09:42 ~/public_gopher
- edit gophermap to suit your setup; verify "#! <path>/awk" line at top is correct and the Home, Date, and Time variables match your AWK and working directory. The footer is toggleable via Foot.
Troubleshooting:
- the companion *env_vars.awk* script can be installed in a similar fashion and is useful for probing `ENVIRON["<vars>"]` content.
- permissions for the various files and directories may need to be tweaked depending on the permissions of the user gophernicus runs under; the above instructions were tested on a mostly stock NetBSD system with gophernicus running as user `nobody`.
Questions or Comments:
- send email to `bottles AT sdf DOT org`