17 lines
479 B
Text
17 lines
479 B
Text
#!/sbin/openrc-run
|
|
# Copyright 2026 Shin'ya Minazuki
|
|
|
|
supervisor="supervise-daemon"
|
|
command="/usr/bin/${RC_SVCNAME}"
|
|
command_args="-config /etc/${RC_SVCNAME}/config.yaml"
|
|
command_background="true"
|
|
command_user="${RC_SVCNAME}"
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
|
|
start_pre() {
|
|
ebegin "Checking for the existence of /etc/${RC_SVCNAME}/config.yaml ..."
|
|
if ! checkpath --file /etc/${RC_SVCNAME}/config.yaml; then
|
|
eerror "Configuration file not found"
|
|
eerror "Bailing out."
|
|
fi
|
|
}
|