aboutsummaryrefslogtreecommitdiffstats
path: root/community/gmnisrv/gmnisrv.initd
blob: cc7c6df3e3a009b2e5d9e6e8af5958001af70e38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/sbin/openrc-run
name="gmnisrv"
description="gemini server daemon"
supervisor=supervise-daemon
command=/usr/bin/gmnisrv
command_args="-C $gmnisrv_config"
command_user="gmnisrv:gmnisrv"

start_pre() {
	[ -n "$output_log" ] && checkpath -f "$output_log" -o gmnisrv:gmnisrv
	[ -n "$error_log" ] && checkpath -f "$error_log" -o gmnisrv:gmnisrv
	certs="$(grep '^store=' "$gmnisrv_config" | cut -d= -f2-)"
	checkpath -d "$certs" -o gmnisrv:gmnisrv
}