diff options
author | Alin Năstac <mrness@gentoo.org> | 2008-02-16 07:11:25 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2008-02-16 07:11:25 +0000 |
commit | ceac2d1e7836952d515b362326fd1d205b9ee9ef (patch) | |
tree | d67ef4dc043b872365d127165eb7ac812999d61e | |
parent | Stable for HPPA (bug #210197). (diff) | |
download | gentoo-2-ceac2d1e7836952d515b362326fd1d205b9ee9ef.tar.gz gentoo-2-ceac2d1e7836952d515b362326fd1d205b9ee9ef.tar.bz2 gentoo-2-ceac2d1e7836952d515b362326fd1d205b9ee9ef.zip |
Improve init script (#209115).
(Portage version: 2.1.3.19, RepoMan options: --force)
-rw-r--r-- | net-proxy/tinyproxy/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/tinyproxy/files/digest-tinyproxy-1.6.3-r1 | 3 | ||||
-rw-r--r-- | net-proxy/tinyproxy/files/tinyproxy.initd | 45 | ||||
-rwxr-xr-x | net-proxy/tinyproxy/files/tinyproxy.rc | 26 | ||||
-rw-r--r-- | net-proxy/tinyproxy/tinyproxy-1.6.3-r1.ebuild (renamed from net-proxy/tinyproxy/tinyproxy-1.6.3.ebuild) | 6 |
5 files changed, 59 insertions, 31 deletions
diff --git a/net-proxy/tinyproxy/ChangeLog b/net-proxy/tinyproxy/ChangeLog index 96c9e9924536..bdc4cde080e3 100644 --- a/net-proxy/tinyproxy/ChangeLog +++ b/net-proxy/tinyproxy/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-proxy/tinyproxy -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.9 2007/04/28 16:51:44 swegener Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.10 2008/02/16 07:11:25 mrness Exp $ + +*tinyproxy-1.6.3-r1 (16 Feb 2008) + + 16 Feb 2008; Alin Năstac <mrness@gentoo.org> +files/tinyproxy.initd, + -files/tinyproxy.rc, -tinyproxy-1.6.3.ebuild, +tinyproxy-1.6.3-r1.ebuild: + Improve init script (#209115). 28 Apr 2007; Sven Wegener <swegener@gentoo.org> tinyproxy-1.6.3.ebuild: Fix *initd, *confd and *envd calls (#17388, #174266) diff --git a/net-proxy/tinyproxy/files/digest-tinyproxy-1.6.3-r1 b/net-proxy/tinyproxy/files/digest-tinyproxy-1.6.3-r1 new file mode 100644 index 000000000000..3bf72ce9148c --- /dev/null +++ b/net-proxy/tinyproxy/files/digest-tinyproxy-1.6.3-r1 @@ -0,0 +1,3 @@ +MD5 bd14d029b12621bcfd7ee71b2f4893da tinyproxy-1.6.3.tar.gz 467348 +RMD160 a5503d03bdfe00fd232c643b518bd6c3e034dc33 tinyproxy-1.6.3.tar.gz 467348 +SHA256 cf4f2005fcd69f10087c598398c1a156d1827b9fb11c769ab6587b7b1ea4a2dc tinyproxy-1.6.3.tar.gz 467348 diff --git a/net-proxy/tinyproxy/files/tinyproxy.initd b/net-proxy/tinyproxy/files/tinyproxy.initd new file mode 100644 index 000000000000..bee5d041fbdc --- /dev/null +++ b/net-proxy/tinyproxy/files/tinyproxy.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy.initd,v 1.1 2008/02/16 07:11:25 mrness Exp $ + +CONFFILE="/etc/tinyproxy/${SVCNAME}.conf" + +depend() { + use logger dns + need net +} + +checkconfig() { + if [ ! -f "${CONFFILE}" ]; then + eerror "Configuration file ${CONFFILE} not found!" + return 1 + fi + + PIDFILE=$(sed -n -e 's/^[[:space:]]*PidFile[[:space:]]\+"\(.*\)"[[:space:]]*$/\1/p' "${CONFFILE}") + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Starting tinyproxy" + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --start --pidfile "${PIDFILE}" --startas /usr/sbin/tinyproxy -- -c "${CONFFILE}" + else + start-stop-daemon --start --exec /usr/sbin/tinyproxy -- -c "${CONFFILE}" + fi + eend $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping tinyproxy" + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --stop --pidfile "${PIDFILE}" + else + start-stop-daemon --stop --exec /usr/sbin/tinyproxy + fi + eend $? +} diff --git a/net-proxy/tinyproxy/files/tinyproxy.rc b/net-proxy/tinyproxy/files/tinyproxy.rc deleted file mode 100755 index 83aa85c27645..000000000000 --- a/net-proxy/tinyproxy/files/tinyproxy.rc +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy.rc,v 1.1 2005/04/22 19:15:12 mrness Exp $ - -depend() { - use logger dns - need net -} - -start() { - ebegin "Starting tinyproxy" - /usr/sbin/tinyproxy - eend $? -} - -stop() { - local pid=0 - if [ -f /var/run/tinyproxy.pid ] ; then - pid=$(</var/run/tinyproxy.pid) - rm /var/run/tinyproxy.pid - fi - ebegin "Stopping tinyproxy" - [ ${pid} -ne 0 ] && kill ${pid} - eend $? -} diff --git a/net-proxy/tinyproxy/tinyproxy-1.6.3.ebuild b/net-proxy/tinyproxy/tinyproxy-1.6.3-r1.ebuild index cd0f56b52d2d..2879c3c7f95b 100644 --- a/net-proxy/tinyproxy/tinyproxy-1.6.3.ebuild +++ b/net-proxy/tinyproxy/tinyproxy-1.6.3-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/tinyproxy-1.6.3.ebuild,v 1.9 2007/04/28 16:51:44 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/tinyproxy-1.6.3-r1.ebuild,v 1.1 2008/02/16 07:11:25 mrness Exp $ DESCRIPTION="A lightweight HTTP/SSL proxy" HOMEPAGE="http://tinyproxy.sourceforge.net/" @@ -36,7 +36,7 @@ src_install() { dodoc AUTHORS ChangeLog NEWS README TODO mv "${D}/usr/share/tinyproxy" "${D}/usr/share/doc/${PF}/html" - newinitd "${FILESDIR}/tinyproxy.rc" tinyproxy + newinitd "${FILESDIR}/tinyproxy.initd" tinyproxy } pkg_postinst() { |