You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.3 KiB

# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="Spectrum2 Transport"
depend() {
need net
start() {
ebegin "Starting ${name}"
"${su}" "${command_user}" -c "${command} start" -s "${shell}"
eend $?
start_pre() {
# Ensure /run/spectrum2 dir is owned by spectrum user.
# spectrum2_manager stores pidfiles of individual services here.
# See security related comment at the bottom.
checkpath -d -o "${command_user}:${command_group}" -q "/run/spectrum2"
status() {
ebegin "Status ${name}"
"${su}" "${command_user}" -c "${command} status" -s "${shell}"
eend $?
stop() {
ebegin "Stopping ${name}"
"${su}" "${command_user}" -c "${command} stop" -s "${shell}"
eend $?
# Andrey Utkin <> (24 Nov 2018)
# Conrad Kostecki <> (24 Nov 2018)
# We are aware of many security issues caused by careless chowning, see
# We believe none of these issues apply.
# These pidfiles are not read by any privileged process.
# checkpath here chowns only the dir itself and doesn't act recursively.