diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/spiped/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/spiped/files')
-rw-r--r-- | net-misc/spiped/files/spiped.confd | 21 | ||||
-rw-r--r-- | net-misc/spiped/files/spiped.initd | 32 |
2 files changed, 53 insertions, 0 deletions
diff --git a/net-misc/spiped/files/spiped.confd b/net-misc/spiped/files/spiped.confd new file mode 100644 index 000000000000..117be90309c3 --- /dev/null +++ b/net-misc/spiped/files/spiped.confd @@ -0,0 +1,21 @@ +# /etc/conf.d/spiped + +# Once you're happy with your settings, +# set IS_CONFIGURED to "yes". +IS_CONFIGURED="no" + +# spiped is shipped with plenty of options. +# Please see the man page for the complete list. +# -e : encrypt communication +# -d : decrypt communication +OPTS="-e" + +# Address and port on which spiped should listen for incoming connections. +# If you want it to listen on the loopback interface, do not specify "localhost" +# but the localhost IP address instead. spiped won't start if you do so. +SRCHOST="127.0.0.1" +SRCPORT="12345" + +# Address and port to which spiped should connect +TARGETHOST="some.domain.tld" +TARGETPORT="1337" diff --git a/net-misc/spiped/files/spiped.initd b/net-misc/spiped/files/spiped.initd new file mode 100644 index 000000000000..80a164c64999 --- /dev/null +++ b/net-misc/spiped/files/spiped.initd @@ -0,0 +1,32 @@ +#!/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 +} |