Fix for bz#1672284

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
This commit is contained in:
Alexander Scheel 2019-02-05 11:33:54 -05:00
parent 3bfe24f9cb
commit ecea0d0429
No known key found for this signature in database
GPG Key ID: C0D6C737D0003143
2 changed files with 7 additions and 11 deletions

View File

@ -1,7 +1,7 @@
Summary: High-performance and highly configurable free RADIUS server
Name: freeradius
Version: 3.0.17
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freeradius.org/
@ -319,16 +319,6 @@ getent group radiusd >/dev/null || /usr/sbin/groupadd -r -g 95 radiusd > /dev/n
getent passwd radiusd >/dev/null || /usr/sbin/useradd -r -g radiusd -u 95 -c "radiusd user" -d %{_localstatedir}/lib/radiusd -s /sbin/nologin radiusd > /dev/null 2>&1
exit 0
%post
%systemd_post radiusd.service
if [ $1 -eq 1 ]; then # install
# Initial installation
if [ ! -e /etc/raddb/certs/server.pem ]; then
/sbin/runuser -g radiusd -c 'umask 007; /etc/raddb/certs/bootstrap' > /dev/null 2>&1
fi
fi
exit 0
%preun
%systemd_preun radiusd.service
@ -800,6 +790,10 @@ exit 0
%attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest
%changelog
* Mon Feb 05 2019 Alexander Scheel <ascheel@redhat.com> - 3.0.17-5
- Unit file generates certificates if not present.
Resolves: bz#1672284
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -6,6 +6,8 @@ After=syslog.target network-online.target ipa.service dirsrv.target krb5kdc.serv
Type=forking
PIDFile=/var/run/radiusd/radiusd.pid
ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd
ExecStartPre=/bin/sh /etc/raddb/certs/bootstrap
ExecStartPre=/bin/chgrp -R radiusd /etc/raddb/certs/
ExecStartPre=/usr/sbin/radiusd -C
ExecStart=/usr/sbin/radiusd -d /etc/raddb
ExecReload=/usr/sbin/radiusd -C