From 8c537ceacee34afc593a7dff3224db4131193f5a Mon Sep 17 00:00:00 2001 From: Ben Kohler Date: Tue, 9 Oct 2018 08:45:50 -0500 Subject: [PATCH] net-proxy/tinyproxy: revbump for changed paths in service files Signed-off-by: Ben Kohler Package-Manager: Portage-2.3.51, Repoman-2.3.11 --- .../tinyproxy/files/tinyproxy-1.10.0.initd | 40 +++++++++++++++++++ .../tinyproxy/files/tinyproxy-1.10.0.service | 9 +++++ ...10.0.ebuild => tinyproxy-1.10.0-r1.ebuild} | 4 +- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd create mode 100644 net-proxy/tinyproxy/files/tinyproxy-1.10.0.service rename net-proxy/tinyproxy/{tinyproxy-1.10.0.ebuild => tinyproxy-1.10.0-r1.ebuild} (93%) diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd new file mode 100644 index 000000000000..48688a2c19c5 --- /dev/null +++ b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +get_config() { + res=$(awk '$1 == "'$1'" { s=$2 } END { print s }' "$CONFFILE") + + if [ "x$res" = "x" ]; then + echo "$2" + else + eval echo "$res" + fi +} + +: ${CONFFILE:="/etc/${SVCNAME}/${SVCNAME}.conf"} + +command=/usr/bin/tinyproxy +command_args="-c ${CONFFILE}" +pidfile=$(get_config PidFile /run/tinyproxy/${SVCNAME}.pid) + +depend() { + config "$CONFFILE" + + use dns + + [ "$(get_config Syslog Off)" = "On" ] && \ + use logger +} + +start_pre() { + piddir=$(dirname ${pidfile}) + + if [ "${piddir}" = "/run" ]; then + eerror "Please change your PidFile settings to be within the" + eerror "/run/tinyproxy directory" + eend 1 + else + checkpath -d -o $(get_config User tinyproxy):$(get_config Group tinyproxy) ${piddir} + fi +} diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service new file mode 100644 index 000000000000..e78310098778 --- /dev/null +++ b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service @@ -0,0 +1,9 @@ +[Unit] +Description=Tinyproxy Web Proxy Server +After=network.target + +[Service] +ExecStart=/usr/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-proxy/tinyproxy/tinyproxy-1.10.0.ebuild b/net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild similarity index 93% rename from net-proxy/tinyproxy/tinyproxy-1.10.0.ebuild rename to net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild index ea8b9f2b083a..bb01f6269077 100644 --- a/net-proxy/tinyproxy/tinyproxy-1.10.0.ebuild +++ b/net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild @@ -58,8 +58,8 @@ src_install() { diropts -m0775 -o ${PN} -g ${PN} keepdir /var/log/${PN} - newinitd "${FILESDIR}"/${PN}-1.8.3-r2.initd tinyproxy - systemd_dounit "${FILESDIR}"/${PN}.service + newinitd "${FILESDIR}"/${PN}-1.10.0.initd tinyproxy + systemd_dounit "${FILESDIR}"/${PN}-1.10.0.service systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf } -- 2.26.2