Change default pid file into run directory

This commit is contained in:
Petr Menšík 2021-04-08 08:36:46 +02:00
parent 7ce0e29ff5
commit 72ba11797c
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@ Description=DNS caching server.
After=network.target
[Service]
ExecStart=/usr/sbin/dnsmasq --pid-file=/run/dnsmasq.pid
ExecStart=/usr/sbin/dnsmasq
Type=forking
PIDFile=/run/dnsmasq.pid

View File

@ -106,6 +106,7 @@ done
#set default user /group in src/config.h
sed -i 's|#define CHUSER "nobody"|#define CHUSER "dnsmasq"|' src/config.h
sed -i 's|#define CHGRP "dip"|#define CHGRP "dnsmasq"|' src/config.h
sed -i "s|\(#\s*define RUNFILE\) \"/var/run/dnsmasq.pid\"|\1 \"%{_rundir}/dnsmasq.pid\"|" src/config.h
# optional parts
sed -i 's|^COPTS[[:space:]]*=|\0 -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_DNSSEC|' Makefile