#!/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} : ${KTRA_USER:=ktra} : ${KTRA_GROUP:=ktra} : ${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}"