aports/community/ktistec/ktistec.initd
2024-04-16 11:19:23 +00:00

31 lines
659 B
Bash

#!/sbin/openrc-run
name=ktistec
description="Ktistec is a single-user ActivityPub server written in Crystal"
command="/usr/bin/ktistec"
command_args="
${ktistec_host:+--bind $ktistec_host}
${ktistec_port:+--port $ktistec_port}
$extra_opts
"
command_background="yes"
command_user="ktistec:ktistec"
pidfile="/run/${RC_SVCNAME}.pid"
directory="/var/lib/ktistec"
output_log="/var/log/ktistec.log"
error_log="/var/log/ktistec.log"
depend() {
need localmount net
after firewall
}
start_pre() {
checkpath -f -m 0640 -o "$command_user" \
"$output_log" "$error_log"
checkpath -d -m 0750 -o "$command_user" \
"$directory" "$directory/public/uploads"
}