From: Matthew Newton Date: Thu, 28 Feb 2019 21:37:07 +0000 (+0000) Subject: Ensure freeradius can write its pidfile X-Git-Tag: release_3_0_19~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e87fe13c119dc588bd983196a267bc5fa2c3ba37;p=thirdparty%2Ffreeradius-server.git Ensure freeradius can write its pidfile --- diff --git a/debian/freeradius.service b/debian/freeradius.service index 26e49d39f39..0da15a515b7 100644 --- a/debian/freeradius.service +++ b/debian/freeradius.service @@ -23,8 +23,16 @@ Environment=HOSTNAME=%H # a leak somewhere. MemoryLimit=2G +# Ensure the daemon can still write its pidfile after it drops +# privileges. Combination of options that work on a variety of +# systems. Test very carefully if you alter these lines. RuntimeDirectory=freeradius RuntimeDirectoryMode=0775 +# This does not work on Debian Jessie: +Group=freerad +# This does not work on Ubuntu Bionic: +ExecStartPre=/bin/chown freerad:freerad /var/run/freeradius + ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cx -lstdout ExecStart=/usr/sbin/freeradius $FREERADIUS_OPTIONS Restart=on-failure