From: | "Patrice Clement (monsieurp)" <monsieurp@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/spiped/files: spiped.confd spiped.initd |
Date: | Thu, 05 Mar 2015 16:24:09 |
Message-Id: | 20150305162403.F3D08131AC@oystercatcher.gentoo.org |
1 | monsieurp 15/03/05 16:24:03 |
2 | |
3 | Added: spiped.confd spiped.initd |
4 | Log: |
5 | Adding spiped-1.5.0 to Portage courtesy of Tomas Mozes <hydrapolic@×××××.com>. Fix #542216. |
6 | |
7 | (Portage version: 2.2.14/cvs/Linux i686, unsigned Manifest commit) |
8 | |
9 | Revision Changes Path |
10 | 1.1 net-misc/spiped/files/spiped.confd |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.confd?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.confd?rev=1.1&content-type=text/plain |
14 | |
15 | Index: spiped.confd |
16 | =================================================================== |
17 | # /etc/conf.d/spiped |
18 | |
19 | # Once you're happy with your settings, |
20 | # set IS_CONFIGURED to "yes". |
21 | IS_CONFIGURED="no" |
22 | |
23 | # spiped is shipped with plenty of options. |
24 | # Please see the man page for the complete list. |
25 | # -e : encrypt communication |
26 | # -d : decrypt communication |
27 | OPTS="-e" |
28 | |
29 | # Address and port on which spiped should listen for incoming connections. |
30 | # If you want it to listen on the loopback interface, do not specify "localhost" |
31 | # but the localhost IP address instead. spiped won't start if you do so. |
32 | SRCHOST="127.0.0.1" |
33 | SRCPORT="12345" |
34 | |
35 | # Address and port to which spiped should connect |
36 | TARGETHOST="some.domain.tld" |
37 | TARGETPORT="1337" |
38 | |
39 | |
40 | |
41 | 1.1 net-misc/spiped/files/spiped.initd |
42 | |
43 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.initd?rev=1.1&view=markup |
44 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/spiped/files/spiped.initd?rev=1.1&content-type=text/plain |
45 | |
46 | Index: spiped.initd |
47 | =================================================================== |
48 | #!/sbin/runscript |
49 | # Copyright 1999-2015 Gentoo Foundation |
50 | # Distributed under the terms of the GNU General Public License v2 |
51 | # $Header: /var/cvsroot/gentoo-x86/net-misc/spiped/files/spiped.initd,v 1.1 2015/03/05 16:24:03 monsieurp Exp $ |
52 | |
53 | KEYFILE=${KEYFILE:="/etc/spiped/keyfile"} |
54 | SPIPED_USER=${SPIPED_USER:="nobody"} |
55 | PIDFILE="/run/spiped/spiped.pid" |
56 | |
57 | command="spiped" |
58 | command_args="${OPTS} -s [${SRCHOST}]:${SRCPORT} -t ${TARGETHOST}:${TARGETPORT} -k ${KEYFILE} -p ${PIDFILE}" |
59 | |
60 | depend() { |
61 | use net |
62 | before logger |
63 | } |
64 | |
65 | checkconfig() { |
66 | if [[ ! "$IS_CONFIGURED" == "yes" ]]; then |
67 | eerror "You need to setup /etc/conf.d/spiped first!" |
68 | return 1 |
69 | fi |
70 | } |
71 | |
72 | start() { |
73 | checkconfig || return 1 |
74 | |
75 | ebegin "Starting ${SVCNAME}" |
76 | checkpath -d -o "${SPIPED_USER}" -m750 "$(dirname "${PIDFILE}")" |
77 | |
78 | start-stop-daemon --start \ |
79 | --user ${SPIPED_USER} \ |
80 | --pidfile ${PIDFILE} \ |
81 | --exec $command -- $command_args |
82 | |
83 | eend $? |
84 | } |
85 | |
86 | stop() { |
87 | ebegin "Stopping ${SVCNAME}" |
88 | |
89 | start-stop-daemon --stop \ |
90 | --pidfile ${PIDFILE} |
91 | |
92 | eend $? |
93 | } |