Files
minazuki-overlay/net-im/dendrite/files/dendrite.initd-r0
Shin'ya Minazuki 5d3ec9af35 net-im/dendrite: correct call to checkpath
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
2026-05-12 11:36:41 -03:00

27 lines
677 B
Plaintext

#!/sbin/openrc-run
# Copyright 2026 Shin'ya Minazuki
supervisor="supervise-daemon"
command="/usr/sbin/${RC_SVCNAME}"
command_args="--config /etc/${RC_SVCNAME}.yaml"
command_user="${RC_SVCNAME}"
command_background="true"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
# PostgreSQL is not listed here due to the SLOT mechanism
# used by the package manager.
# Latest stable version to date is postgresql-18
want caddy nginx
}
start_pre() {
ebegin "Checking for the existence of /etc/${RC_SVCNAME}.yaml"
if ! checkpath --file /etc/${RC_SVCNAME}.yaml; then
eerror "You need a configuration file to proceed"
eerror "See /usr/sbin/dendrite-generate-config"
fi
eend $?
}