2016-02-11 11:17:28 +01:00
|
|
|
#!/sbin/openrc-run
|
2018-09-20 12:17:02 +02:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
2014-03-18 11:00:56 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2018-09-20 12:17:02 +02:00
|
|
|
SPECTRUM2_GROUP="spectrum"
|
|
|
|
SPECTRUM2_MANAGER="/usr/bin/spectrum2_manager"
|
|
|
|
SPECTRUM2_USER="spectrum"
|
2014-03-18 11:00:56 +01:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2018-09-20 12:17:02 +02:00
|
|
|
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
|
2014-03-18 11:00:56 +01:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2018-09-20 12:17:02 +02:00
|
|
|
ebegin "Stopping Spectrum2 Transport"
|
|
|
|
start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \
|
|
|
|
--exec ${SPECTRUM2_MANAGER} stop
|
2014-03-18 11:00:56 +01:00
|
|
|
eend $?
|
|
|
|
}
|