💾 Archived View for home.gegeweb.org › freebsd › start_agate.gmi captured on 2022-04-28 at 17:24:09. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Script de démarrage Agate sous FreeBSD

DĂ©marrer automatiquement le serveur Gemini Agate sous FreeBSD

On part du principe que vous avez compilé et installé le serveur Gemini Agate sous FreeBSD dans le répertoire /usr/local/bin.

Agate, un serveur Gemini simple.

Starting and Stopping Services (rc Scripts)

Attention, si vous configurez Agate pour écouter en IPV4 et en IPV6, voir :

Mappage des adresses IPv6

Script rc

#!/bin/sh

# $FreeBSD$
#
# PROVIDE: agate
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# agate_enable (bool):  Set to NO by default.
#                       Set it to YES to enable agate.
# agate_user:           default www
# agate_content:        default /usr/local/www/gemini
# agate_key:            default /usr/local/etc/gemini/ssl/key.rsa
# agate_cert:           default /usr/local/etc/gemini/ssl/cert.pem
# agate_hostname:       e.g., gemini.example.tld, default hostname
# agate_addr:           default [::], listen on IPV4 and IPV6
# agate_port:           default 1965
# agate_lang:           default en_US
# agate_logfile:        default /var/log/gemini/agate.log

. /etc/rc.subr

desc="Agate Gemini server"
name=agate
rcvar=$name_enable

load_rc_config $name

: ${agate_enable:="NO"}
: ${agate_user:="www"}
: ${agate_content:="/usr/local/www/gemini/"}
: ${agate_key:="/usr/local/etc/gemini/ssl/key.rsa"}
: ${agate_cert:="/usr/local/etc/gemini/ssl/cert.pem"}
: ${agate_hostname:=`uname -n`}
: ${agate_addr:="[::]"}
: ${agate_port:="1965"}
: ${agate_lang:="en-US"}
: ${agate_logfile:="/var/log/gemini/agate.log"}

agate_user=${agate_user}

command="/usr/local/bin/agate"
command_args="--content ${agate_content} \
		--key ${agate_key} \
		--cert ${agate_cert} \
		--addr ${agate_addr}:${agate_port} \
		--hostname ${agate_hostname} \
		--lang ${agate_lang} >> ${agate_logfile} 2>&1 &"

run_rc_command "$1"

/usr/local/etc/rc.d/agate

________________________________________________________________________________

FreeBSD

Accueil