| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| public:gemini_toaster [2021/02/21 19:33] – Nico | public:gemini_toaster [2023/06/21 22:38] (current) – fix code tag bug Nico |
|---|
| |
| * Add the following lines to /etc/inetd.conf. Adjust -d parameter to previously created user's home directory, don't forget the last slash: | * Add the following lines to /etc/inetd.conf. Adjust -d parameter to previously created user's home directory, don't forget the last slash: |
| | |
| <code> | <code> |
| gemini stream tcp nowait gemini /usr/local/bin/vger vger -v -i -d /home/gemini/ | gemini stream tcp nowait gemini /usr/local/bin/vger vger -v -i -d /home/gemini/ |
| |
| * Activate inetd either by issuing | * Activate inetd either by issuing |
| | |
| <code bash> | <code bash> |
| # sysrc inetd_enable="YES" | # sysrc inetd_enable="YES" |
| |
| or, if you use separate files: | or, if you use separate files: |
| | |
| <code bash> | <code bash> |
| # echo "inetd_enable=\"YES\"">/usr/local/etc/rc.conf.d/inetd | # echo "inetd_enable=\"YES\"">/usr/local/etc/rc.conf.d/inetd |
| ===== Basic monitoring ===== | ===== Basic monitoring ===== |
| |
| The following miniamlistic script can be used to check for capsule availability in Nagios/Icinga/Shinken/Etc., assuming gnutls is installed: | The following minimalist script can be used to check for capsule availability in Nagios/Icinga/Shinken/Etc., assuming gnutls is installed: |
| |
| <code bash> | <code bash> |
| #!/bin/sh | #!/bin/sh |
| TLS_CLIENT="/usr/local/bin/gnutls-cli -p 1965" | |
| |
| errorOutput=$(echo -n "gemini://$1/\r\n" | ${TLS_CLIENT} $1 2>&1 > /dev/null) | errorOutput=$(echo -n "gemini://$1/\r\n" | /usr/local/bin/gnutls-cli --port 1965 --tofu $1 2>&1 > /dev/null) |
| errorCode=$? | errorCode=$? |
| | |
| if [ $errorCode -gt 0 ] | if [ $errorCode -gt 0 ] |
| then | then |
| fi | fi |
| </code> | </code> |
| | |
| | Here we use "trust on first use authentication" (--tofu), so don't forget to manually launch gnutls-cli first. And if security is not your primary concern, you can use the more permissive --no-ca-verification flag instead. |
| |
| ===== Greetings ===== | ===== Greetings ===== |
| |
| Many many thanks to [[https://bsd.network/@solene|@solene@bsd.network]] for writing that wonderful little piece of software thas is vger, and [[https://framapiaf.org/@hucste|@hucste@framapiaf.org]] for pointing it to me. | Many many thanks to [[https://bsd.network/@solene|@solene@bsd.network]] for writing that wonderful little piece of software thas is vger, and [[https://framapiaf.org/@hucste|@hucste@framapiaf.org]] for pointing it to me. |