tinyproxy: patches for username and systemd (optional)
This commit is contained in:
parent
ff1e779c20
commit
d91ae16d6e
13
packages/net-proxy/tinyproxy/files/systemd.patch
Normal file
13
packages/net-proxy/tinyproxy/files/systemd.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/etc/tinyproxy.conf.in 2010-03-03 10:37:24.000000000 +0100
|
||||||
|
+++ b/etc/tinyproxy.conf.in 2013-03-09 15:34:41.072135782 +0100
|
||||||
|
@@ -123,7 +123,11 @@
|
||||||
|
# can be used for signalling purposes.
|
||||||
|
#
|
||||||
|
#PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
|
||||||
|
+#
|
||||||
|
+# systemd wants all pidfiles in /run.
|
||||||
|
+# Do not change the following line:
|
||||||
|
+PidFile "/run/tinyproxy/tinyproxy.pid"
|
||||||
|
|
||||||
|
#
|
||||||
|
# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which
|
13
packages/net-proxy/tinyproxy/files/user.patch
Normal file
13
packages/net-proxy/tinyproxy/files/user.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/etc/tinyproxy.conf.in 2010-03-03 10:37:24.000000000 +0100
|
||||||
|
+++ b/etc/tinyproxy.conf.in 2013-03-09 15:34:41.072135782 +0100
|
||||||
|
@@ -12,8 +12,8 @@
|
||||||
|
# as the root user. Either the user or group name or the UID or GID
|
||||||
|
# number may be used.
|
||||||
|
#
|
||||||
|
-User nobody
|
||||||
|
-Group nobody
|
||||||
|
+User tinyproxy
|
||||||
|
+Group tinyproxy
|
||||||
|
|
||||||
|
#
|
||||||
|
# Port: Specify the port which tinyproxy will listen on. Please note
|
|
@ -23,20 +23,8 @@ MYOPTIONS="systemd"
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
c="etc/tinyproxy.conf.in"
|
c="etc/tinyproxy.conf.in"
|
||||||
b="${c}.bk"
|
b="${c}.bk"
|
||||||
if option systemd
|
option systemd && expatch "${FILES}/systemd.patch"
|
||||||
then
|
expatch "${FILES}/user.patch
|
||||||
sed -e 's,^#PidFile.*,&\
|
|
||||||
#\
|
|
||||||
# systemd wants all pidfiles in /run.\
|
|
||||||
# Do not change the following line:\
|
|
||||||
PidFile "/run/tinyproxy/tinyproxy.pid",'
|
|
||||||
else
|
|
||||||
cat
|
|
||||||
fi < "${c}" > "${b}"
|
|
||||||
sed \
|
|
||||||
-e 's/^User nobody/User tinyproxy/' \
|
|
||||||
-e 's/^Group nobody/Group tinyproxy/' \
|
|
||||||
< "${b}" > "${c}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
Loading…
Reference in a new issue