#!/sbin/openrc-run # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 SPECTRUM2_GROUP="spectrum" SPECTRUM2_MANAGER="/usr/bin/spectrum2_manager" SPECTRUM2_USER="spectrum" depend() { need net } start() { ebegin "Starting Spectrum2 Transport" start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \ --exec ${SPECTRUM2_MANAGER} start eend $? } start_pre() { checkpath -d -o ${SPECTRUM2_USER}:${SPECTRUM2_GROUP} -q /run/spectrum2 } status() { ebegin "Status Spectrum2 Transport" ${SPECTRUM2_MANAGER} status eend $? } stop() { ebegin "Stopping Spectrum2 Transport" start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \ --exec ${SPECTRUM2_MANAGER} stop eend $? }