gentoo-ebuilds/net-misc/spiped/files/spiped.initd
Patrice Clement 68ea4dcfcb
net-misc/spiped: switch string cmp to POSIX sh
Closes: https://bugs.gentoo.org/849329
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
2023-01-12 23:55:36 +01:00

32 lines
646 B
Text

#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
: ${KEYFILE:="/etc/spiped/keyfile"}
: ${SPIPED_USER:="nobody"}
command="/usr/sbin/spiped"
command_args="${OPTS}
-s [${SRCHOST}]:${SRCPORT}
-t ${TARGETHOST}:${TARGETPORT}
-k ${KEYFILE}
-F"
command_background="true"
command_user="${SPIPED_USER}"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
use net
before logger
}
checkconfig() {
if [ ! "$IS_CONFIGURED" = "yes" ]; then
eerror "You need to setup /etc/conf.d/spiped first!"
return 1
fi
}
start_pre() {
checkconfig || return 1
}