From: | "Anthony G. Basile (blueness)" <blueness@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/stunnel/files: stunnel.conf-r1 stunnel.tmpfiles.conf-r1 stunnel.rc7 |
Date: | Tue, 10 Jun 2014 11:39:38 |
Message-Id: | 20140610113933.9078B2004F@flycatcher.gentoo.org |
1 | blueness 14/06/10 11:39:33 |
2 | |
3 | Added: stunnel.conf-r1 stunnel.tmpfiles.conf-r1 |
4 | stunnel.rc7 |
5 | Log: |
6 | Fix bug #476672 |
7 | |
8 | (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
9 | |
10 | Revision Changes Path |
11 | 1.1 net-misc/stunnel/files/stunnel.conf-r1 |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.conf-r1?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.conf-r1?rev=1.1&content-type=text/plain |
15 | |
16 | Index: stunnel.conf-r1 |
17 | =================================================================== |
18 | # Sample stunnel configuration file by Michal Trojnara 2002-2005 |
19 | # Some options used here may not be adequate for your particular configuration |
20 | # Please make sure you understand them (especially the effect of chroot jail) |
21 | |
22 | # Certificate/key is needed in server mode and optional in client mode |
23 | # cert = /etc/stunnel/stunnel.pem |
24 | # key = /etc/stunnel/stunnel.pem |
25 | |
26 | # Some security enhancements for UNIX systems - comment them out on Win32 |
27 | # chroot = /chroot/stunnel/ |
28 | setuid = stunnel |
29 | setgid = stunnel |
30 | # PID is created inside chroot jail |
31 | pid = /run/stunnel/stunnel.pid |
32 | |
33 | # Some performance tunings |
34 | socket = l:TCP_NODELAY=1 |
35 | socket = r:TCP_NODELAY=1 |
36 | #compression = rle |
37 | |
38 | # Workaround for Eudora bug |
39 | #options = DONT_INSERT_EMPTY_FRAGMENTS |
40 | |
41 | # Authentication stuff |
42 | #verify = 2 |
43 | # Don't forget to c_rehash CApath |
44 | # CApath is located inside chroot jail: |
45 | #CApath = /certs |
46 | # It's often easier to use CAfile: |
47 | #CAfile = /etc/stunnel/certs.pem |
48 | # Don't forget to c_rehash CRLpath |
49 | # CRLpath is located inside chroot jail: |
50 | #CRLpath = /crls |
51 | # Alternatively you can use CRLfile: |
52 | #CRLfile = /etc/stunnel/crls.pem |
53 | |
54 | # Some debugging stuff useful for troubleshooting |
55 | #debug = 7 |
56 | #output = stunnel.log |
57 | |
58 | # Use it for client mode |
59 | #client = yes |
60 | |
61 | # Service-level configuration |
62 | |
63 | #[pop3s] |
64 | #accept = 995 |
65 | #connect = 110 |
66 | |
67 | #[imaps] |
68 | #accept = 993 |
69 | #connect = 143 |
70 | |
71 | #[ssmtp] |
72 | #accept = 465 |
73 | #connect = 25 |
74 | |
75 | #[https] |
76 | #accept = 443 |
77 | #connect = 80 |
78 | #TIMEOUTclose = 0 |
79 | |
80 | |
81 | |
82 | 1.1 net-misc/stunnel/files/stunnel.tmpfiles.conf-r1 |
83 | |
84 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.tmpfiles.conf-r1?rev=1.1&view=markup |
85 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.tmpfiles.conf-r1?rev=1.1&content-type=text/plain |
86 | |
87 | Index: stunnel.tmpfiles.conf-r1 |
88 | =================================================================== |
89 | d /run/stunnel 0770 stunnel stunnel - |
90 | |
91 | |
92 | |
93 | 1.1 net-misc/stunnel/files/stunnel.rc7 |
94 | |
95 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.rc7?rev=1.1&view=markup |
96 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/stunnel/files/stunnel.rc7?rev=1.1&content-type=text/plain |
97 | |
98 | Index: stunnel.rc7 |
99 | =================================================================== |
100 | #!/sbin/runscript |
101 | # Copyright 1999-2014 Gentoo Foundation |
102 | # Distributed under the terms of the GNU General Public License v2 |
103 | # $Header: /var/cvsroot/gentoo-x86/net-misc/stunnel/files/stunnel.rc7,v 1.1 2014/06/10 11:39:33 blueness Exp $ |
104 | |
105 | SERVICENAME=${SVCNAME#*.} |
106 | SERVICENAME=${SERVICENAME:-stunnel} |
107 | STUNNEL_CONFIGFILE=${STUNNEL_CONFIGFILE:-/etc/stunnel/${SERVICENAME}.conf} |
108 | |
109 | depend() { |
110 | need net |
111 | before logger |
112 | } |
113 | |
114 | get_config() { |
115 | if [ ! -e ${STUNNEL_CONFIGFILE} ] ; then |
116 | eerror "You need to create ${STUNNEL_CONFIGFILE} first." |
117 | return 1 |
118 | fi |
119 | CHROOT=$(grep "^chroot" ${STUNNEL_CONFIGFILE} | sed "s;.*= *;;") |
120 | [ -n "${CHROOT}" ] && CHROOT="--chroot ${CHROOT}" |
121 | PIDFILE=$(grep "^pid" ${STUNNEL_CONFIGFILE} | sed "s;.*= *;;") |
122 | PIDFILE=${PIDFILE:-/run/stunnel/${SERVICENAME}.pid} |
123 | } |
124 | |
125 | start() { |
126 | get_config || return 1 |
127 | checkpath -d -m 0775 -o root:stunnel /run/stunnel |
128 | if [ "$(dirname ${PIDFILE})" != "/run" ]; then |
129 | checkpath -d -m 0755 -o stunnel:stunnel -q $(dirname ${PIDFILE}) |
130 | fi |
131 | ebegin "Starting ${SVCNAME}" |
132 | start-stop-daemon --start --pidfile "${PIDFILE}" ${CHROOT} \ |
133 | --exec /usr/bin/stunnel -- ${STUNNEL_CONFIGFILE} ${STUNNEL_OPTIONS} |
134 | eend $? "Failed to start ${SVCNAME}" |
135 | } |
136 | |
137 | stop() { |
138 | get_config || return 1 |
139 | ebegin "Stopping ${SVCNAME}" |
140 | start-stop-daemon --stop --quiet --pidfile ${PIDFILE} |
141 | eend $? "Failed to stop ${SVCNAME}" |
142 | } |