#!/sbin/openrc-run # Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 description="sccache distributed compilation scheduler" : "${SCCACHE_SCHEDULER_CONF:=/etc/sccache/scheduler.conf}" command="/usr/bin/sccache-dist" command_args="scheduler --config ${SCCACHE_SCHEDULER_CONF} ${SCCACHE_SCHEDULER_OPTS}" command_background="yes" pidfile="/run/${RC_SVCNAME}.pid" output_log="${SCCACHE_SCHEDULER_LOG:-/var/log/${RC_SVCNAME}.log}" error_log="${output_log}" # Refuse to start until the operator has created the configuration file. required_files="${SCCACHE_SCHEDULER_CONF}" depend() { need net use dns logger } start_pre() { # Stay in the foreground so OpenRC can track the process. export SCCACHE_NO_DAEMON=1 if [ -n "${SCCACHE_LOG}" ]; then export SCCACHE_LOG fi }