--- /dev/null
+var/lib/freeradius/snmp
usr/lib/freeradius
var/log/freeradius
+var/lib/freeradius
dpkg-statoverride --add --update freerad freerad 0755 /var/run/freeradius
fi
+ if ! dpkg-statoverride --list | grep -q /var/lib/freeradius$; then
+ mkdir -p /var/lib/freeradius
+ dpkg-statoverride --add --update freerad freerad 0755 /var/lib/freeradius
+ fi
+
if ! dpkg-statoverride --list | grep -q /var/log/freeradius$; then
mkdir -p /var/log/freeradius
dpkg-statoverride --add --update freerad freerad 0750 /var/log/freeradius
# We provide HOSTNAME here for convenience.
Environment=HOSTNAME=%H
+# Not needed/used unless the freeradius-snmp package is installed.
+# Used by snmptrap and friends to determine where to stored persistent
+# configuration files.
+Environment=SNMP_PERSISTENT_DIR=/var/lib/freeradius/snmp
+
# Limit memory to 2G this is fine for %99.99 of deployments. FreeRADIUS
# is not memory hungry, if it's using more than this, then there's probably
# a leak somewhere.
# We can read and write to the log directory.
ReadWriteDirectories=/var/log/freeradius/
+# We can read and write to our run dir
+ReadWriteDirectories=/var/run/freeradius/
+
+# We can read and write to our persistent dir
+ReadWriteDirectories=/var/lib/freeradius/
+
[Install]
WantedBy=multi-user.target
%{initddir}/radiusd
%endif
-%dir %attr(755,radiusd,radiusd) /var/lib/radiusd
-%dir %attr(755,radiusd,radiusd) /var/run/radiusd/
+%dir %attr(755,radiusd,radiusd) %{_sharedstatedir}/radiusd/
+%dir %attr(755,radiusd,radiusd) %{_rundir}/radiusd/
# binaries
%defattr(-,root,root)
/usr/sbin/checkrad
%defattr(-,root,root)
/usr/bin/radsnmp
%{_datadir}/snmp/mibs/*
+%dir %attr(750,radiusd,radiusd) %{_sharedstatedir}/radiusd/snmp
%files perl-util
%defattr(-,root,root)
# We provide HOSTNAME here for convenience.
Environment=HOSTNAME=%H
+# Not needed/used unless the freeradius-snmp package is installed.
+# Used by snmptrap and friends to determine where to stored persistent
+# configuration files.
+Environment=SNMP_PERSISTENT_DIR=/var/lib/radiusd/snmp
+
# Limit memory to 2G this is fine for %99.99 of deployments. FreeRADIUS
# is not memory hungry, if it's using more than this, then there's probably
# a leak somewhere.
# We can read and write to the log directory.
ReadWriteDirectories=/var/log/radius/
+# We can read and write to our run dir
+ReadWriteDirectories=/var/run/radiusd/
+
+# We can read and write to our persistent dir
+ReadWriteDirectories=/var/lib/radiusd/
+
[Install]
WantedBy=multi-user.target