shithub: rc-gemd


branches: master

Clone

clone: git://shithub.us/moody/rc-gemd gits://shithub.us/moody/rc-gemd
push: hjgit://shithub.us/moody/rc-gemd
patches to: moody@posixcafe.org

Last commit

91805c65 – Jacob Moody <moody@posixcafe.org> authored on 2022/04/03 18:13
dont set path use bind

About

rc-gemd is a gemini server inspired by rc-httpd.

The scripts expect to be installed under /rc/bin/rc-gemd.

The following script will allow you to test them before installing:
ramfs
mkdir /tmp/rc-gemd
bind . /tmp/rc-gemd
bind -b /tmp /rc/bin

or one can change the rc_gemd_dir setting in the script.

The service can be started with a combination of listen(8) and tlssrv(8),
tlssrv requires that the tls key be in the hostowners factotum,
this can be done by doing:
cat /lib/ssl/gem.key >> /mnt/factotum/ctl

Then to start the server you can do:
aux/listen1 tcp!*!1965 tlssrv -c /lib/ssl/gem.cert /rc/bin/rc-gemd/rc-gemd

If aux/listen is preferred then the following can be used as a tcp1965:
#!/bin/rc
net=$3
exec tlssrv -c /lib/ssl/gem.cert /rc/bin/rc-gemd/rc-gemd >>[2]/sys/log/gemini

The tls files can be generated by running the following commands:
mkdir -p /lib/ssl
auth/rsagen -t 'service=tls owner=*' >/lib/ssl/gem.key
auth/rsa2x509 'C=US CN=your.domain.here' gem.key |
	auth/pemencode CERTIFICATE >/lib/ssl/gem.cert