1 |
flameeyes 13/05/29 17:48:35 |
2 |
|
3 |
Added: tinyproxy-1.8.3.initd |
4 |
Log: |
5 |
Cleanup ebuild, use REQUIRED_USE, always install docs, improve init script so that now it actually works. |
6 |
|
7 |
(Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: tinyproxy-1.8.3.initd |
16 |
=================================================================== |
17 |
#!/sbin/runscript |
18 |
# Copyright 1999-2013 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd,v 1.1 2013/05/29 17:48:35 flameeyes Exp $ |
21 |
|
22 |
get_config() { |
23 |
res=$(awk '$1 == "'$1'" { s=$2 } END { print s }' "$CONFFILE") |
24 |
|
25 |
if [ "x$res" = "x" ]; then |
26 |
echo "$2" |
27 |
else |
28 |
eval echo "$res" |
29 |
fi |
30 |
} |
31 |
|
32 |
: ${CONFFILE:="/etc/${SVCNAME}.conf"} |
33 |
|
34 |
command=/usr/sbin/tinyproxy |
35 |
command_args="-c ${CONFFILE}" |
36 |
pidfile=$(get_config PidFile /var/run/tinyproxy/${SVCNAME}.pid) |
37 |
|
38 |
depend() { |
39 |
config "$CONFFILE" |
40 |
|
41 |
use dns |
42 |
|
43 |
[ "$(get_config Syslog Off)" = "On" ] && \ |
44 |
use logger |
45 |
} |
46 |
|
47 |
start_pre() { |
48 |
piddir=$(dirname ${pidfile}) |
49 |
|
50 |
if [ "${piddir}" = "/var/run" ]; then |
51 |
eerror "Please change your PidFile settings to be within the" |
52 |
eerror "/var/run/tinyproxy directory" |
53 |
eend 1 |
54 |
else |
55 |
checkpath -d -o $(get_config User tinyproxy):$(get_config Group tinyproxy) ${piddir} |
56 |
fi |
57 |
} |