monsieurp    15/03/05 16:24:03

  Added:                spiped.confd spiped.initd
  Log:
  Adding spiped-1.5.0 to Portage courtesy of Tomas Mozes 
<[email protected]>. Fix #542216.
  
  (Portage version: 2.2.14/cvs/Linux i686, unsigned Manifest commit)

Revision  Changes    Path
1.1                  net-misc/spiped/files/spiped.confd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.confd?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.confd?rev=1.1&content-type=text/plain

Index: spiped.confd
===================================================================
# /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"



1.1                  net-misc/spiped/files/spiped.initd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.initd?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.initd?rev=1.1&content-type=text/plain

Index: spiped.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/spiped/files/spiped.initd,v 1.1 
2015/03/05 16:24:03 monsieurp Exp $

KEYFILE=${KEYFILE:="/etc/spiped/keyfile"}
SPIPED_USER=${SPIPED_USER:="nobody"}
PIDFILE="/run/spiped/spiped.pid"

command="spiped"
command_args="${OPTS} -s [${SRCHOST}]:${SRCPORT} -t ${TARGETHOST}:${TARGETPORT} 
-k ${KEYFILE} -p ${PIDFILE}"

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() {
        checkconfig || return 1

        ebegin "Starting ${SVCNAME}"
        checkpath -d -o "${SPIPED_USER}" -m750 "$(dirname "${PIDFILE}")"

        start-stop-daemon --start \
                --user ${SPIPED_USER} \
                --pidfile ${PIDFILE} \
                --exec $command -- $command_args
        
        eend $?
}

stop() {
        ebegin "Stopping ${SVCNAME}"
        
        start-stop-daemon --stop \
                --pidfile ${PIDFILE}
        
        eend $?
}




Reply via email to