diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-10-22 11:09:47 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-10-22 11:09:47 +0100 |
commit | 64e107b9b6058580ff0432107eb37cefb0b2a7d8 (patch) | |
tree | 9a44e603e2ae365e2b1fe35ac37f73e830cdee1d /net-proxy/tinyproxy/files | |
parent | 957235cf19a691360c720f7913672adda4258ed0 (diff) |
gentoo resync : 22.10.2018
Diffstat (limited to 'net-proxy/tinyproxy/files')
-rw-r--r-- | net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd | 40 | ||||
-rw-r--r-- | net-proxy/tinyproxy/files/tinyproxy-1.10.0.service | 9 | ||||
-rw-r--r-- | net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd | 2 |
3 files changed, 50 insertions, 1 deletions
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/files/tinyproxy-1.8.3-r2.initd b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd index 9df4ef5046d7..0d6618b69a9a 100644 --- a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd +++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 get_config() { |