You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/spiped/files/spiped.initd

33 lines
649 B

#!/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
}