[net-im/spectrum] sync with PR (i have to rename this package at some point)

This commit is contained in:
2018-11-12 03:04:42 +01:00
parent a644fb10f6
commit 38f8861377
2 changed files with 46 additions and 42 deletions

View File

@@ -1,35 +1,31 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
SPECTRUM2_GROUP="spectrum"
SPECTRUM2_MANAGER="/usr/bin/spectrum2_manager"
SPECTRUM2_USER="spectrum"
command="/usr/bin/${RC_SVCNAME}_manager"
command_args="start"
command_background="true"
command_group="spectrum"
command_user="spectrum"
name="Spectrum2 Transport"
pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}_manager.pid"
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
checkpath -d -o "${command_user}:${command_group}" -q "/run/${RC_SVCNAME}"
}
status() {
ebegin "Status Spectrum2 Transport"
${SPECTRUM2_MANAGER} status
${command} status
eend $?
}
stop() {
ebegin "Stopping Spectrum2 Transport"
start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \
--exec ${SPECTRUM2_MANAGER} stop
${command} stop
eend $?
}