#!/sbin/openrc-run # # Copyright 2021 Gianni Bombelli # Distributed under the terms of the GNU General Public License as published by the Free Software Foundation; # either version 2 of the License, or (at your option) any later version. depend() { need net } start() { local log_file="-l /var/log/icecream/icecc-scheduler.log" local net_name="${ICECC_SCHEDULER_NET_NAME:+"--net-name $ICECC_SCHEDULER_NET_NAME"}" local verbosity="-${ICECC_SCHEDULER_VERBOSITY:-"v"}" local persistent_client_connection [[ "$ICECC_SCHEDULER_PERSISTENT_CLIENT_CONNECTION" == "yes" ]] \ && persistent_client_connection="--persistent-client-connection" [[ ! -d /var/log/icecream/ ]] && mkdir -p /var/log/icecream/ && chown icecream:icecream /var/log/icecream/ ebegin "Starting Distributed Compiler Scheduler" start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/icecc-scheduler -- -d $log_file $net_name $verbosity \ $persistent_client_connection eend ${?} } stop() { ebegin "Stopping Distributed Compiler Scheduler" start-stop-daemon --stop --quiet --name icecc-scheduler eend ${?} }