2022-01-20 16:05:35 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
# Copyright 2016-2019 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
description="Ktra, your little cargo registry."
|
|
|
|
|
|
|
|
: ${KTRA_CONF:=/etc/ktra.toml}
|
2022-03-09 12:01:16 +01:00
|
|
|
: ${KTRA_USER:=ktra}
|
|
|
|
: ${KTRA_GROUP:=ktra}
|
2022-01-20 16:05:35 +01:00
|
|
|
: ${KTRA_WORK_DIR:=/var/lib/ktra}
|
|
|
|
: ${KTRA_CUSTOM:=${KTRA_WORK_DIR}/custom}
|
|
|
|
|
|
|
|
command="/usr/bin/ktra"
|
|
|
|
command_args="--config ${KTRA_CONF}"
|
|
|
|
command_background="true"
|
|
|
|
command_user="${KTRA_USER}:${KTRA_GROUP}"
|
|
|
|
error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err"
|
|
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
|
|
required_files="${KTRA_CONF}"
|
|
|
|
start_stop_daemon_args="-d ${KTRA_WORK_DIR}"
|
|
|
|
start_stop_daemon_args="${start_stop_daemon_args} -e KTRA_WORK_DIR=${KTRA_WORK_DIR}"
|
|
|
|
start_stop_daemon_args="${start_stop_daemon_args} -e KTRA_CUSTOM=${KTRA_CUSTOM}"
|