updates-proxy: use separate directory for PID file

And also use systemd-tmpfiles for that directory creation.

Fixes QubesOS/qubes-issues#1401
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-11 05:39:30 +01:00
parent 90b4398863
commit 2a589f2c20
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
6 changed files with 6 additions and 3 deletions

View File

@ -92,6 +92,8 @@ install-systemd:
install -m 0644 vm-systemd/qubes-core.conf $(DESTDIR)$(SYSLIBDIR)/modules-load.d/
install -m 0644 vm-systemd/qubes-misc.conf $(DESTDIR)$(SYSLIBDIR)/modules-load.d/
install -m 0755 network/qubes-iptables $(DESTDIR)$(LIBDIR)/qubes/init/
install -D -m 0644 vm-systemd/qubes-core-agent-linux.tmpfiles \
$(DESTDIR)/usr/lib/tmpfiles.d/qubes-core-agent-linux.conf
install-sysvinit:
install -d $(DESTDIR)/etc/init.d

View File

@ -8,7 +8,7 @@ DefaultErrorFile "/usr/share/tinyproxy/default.html"
StatFile "/usr/share/tinyproxy/stats.html"
Syslog On
LogLevel Notice
PidFile "/var/run/tinyproxy/tinyproxy-updates.pid"
PidFile "/var/run/tinyproxy-updates/tinyproxy.pid"
MaxClients 50
MinSpareServers 2

View File

@ -536,6 +536,7 @@ The Qubes core startup configuration for SystemD init.
/lib/systemd/system/tmp.mount.d/30_qubes.conf
/lib/systemd/user/pulseaudio.service.d/30_qubes.conf
/lib/systemd/user/pulseaudio.socket.d/30_qubes.conf
/usr/lib/tmpfiles.d/qubes-core-agent-linux.conf
%post systemd

View File

@ -25,7 +25,7 @@
exec="/usr/sbin/tinyproxy"
prog=$(basename $exec)
config="/etc/tinyproxy/tinyproxy-updates.conf"
pidfile="/var/run/tinyproxy/tinyproxy-updates.pid"
pidfile="/var/run/tinyproxy-updates/tinyproxy.pid"
[ -e /etc/sysconfig/tinyproxy-updates ] && . /etc/sysconfig/tinyproxy-updates

View File

@ -0,0 +1 @@
d /var/run/tinyproxy-updates 0755 tinyproxy tinyproxy

View File

@ -5,7 +5,6 @@ ConditionPathExists=|/var/run/qubes-service/qubes-updates-proxy
After=qubes-iptables.service
[Service]
ExecStartPre=/usr/bin/install -d --owner tinyproxy --group tinyproxy /var/run/tinyproxy
ExecStartPre=/usr/lib/qubes/iptables-updates-proxy start
ExecStart=/usr/sbin/tinyproxy -d -c /etc/tinyproxy/tinyproxy-updates.conf
ExecStopPost=/usr/lib/qubes/iptables-updates-proxy stop