1 |
# $Id: e-smith-radiusd.spec,v 1.9 2019/12/19 06:00:24 jpp Exp $ |
# $Id: e-smith-radiusd.spec,v 1.12 2020/12/09 02:48:39 jpp Exp $ |
2 |
|
|
3 |
Summary: e-smith server and gateway - configure PPTP inbound VPN |
Summary: e-smith server and gateway - configure PPTP inbound VPN |
4 |
%define name e-smith-radiusd |
%define name e-smith-radiusd |
189 |
%patch2 -p1 |
%patch2 -p1 |
190 |
%patch3 -p1 |
%patch3 -p1 |
191 |
%patch4 -p1 |
%patch4 -p1 |
192 |
rm -rf root/service root/var/service |
rm -rf root/service root/var/service root/var/log/radiusd |
193 |
|
mkdir -p root/var/log/stunnel/ssl |
194 |
|
|
195 |
%build |
%build |
196 |
perl createlinks |
perl createlinks |
203 |
--file /sbin/e-smith/systemd/radiusd-configure 'attr(0554,root,root)' \ |
--file /sbin/e-smith/systemd/radiusd-configure 'attr(0554,root,root)' \ |
204 |
--file /sbin/e-smith/systemd/radiusd-certificate 'attr(0554,root,root)' \ |
--file /sbin/e-smith/systemd/radiusd-certificate 'attr(0554,root,root)' \ |
205 |
--dir /var/service/radiusd 'attr(01755,root,root)' \ |
--dir /var/service/radiusd 'attr(01755,root,root)' \ |
206 |
--file /var/service/radiusd/down 'attr(0644,root,root)' \ |
--dir /var/log/stunnel 'attr(0755,stunnel,stunnel)' \ |
207 |
--file /var/service/radiusd/run 'attr(0755,root,root)' \ |
--dir /var/log/stunnel/ssl 'attr(0755,stunnel,stunnel)' \ |
|
--file /var/service/radiusd/log/run 'attr(0755,root,root)' \ |
|
|
--dir /var/service/radiusd/supervise 'attr(0700,root,root)' \ |
|
|
--dir /var/log/radiusd 'attr(0755,smelog,smelog)' \ |
|
208 |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb/d' \ |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb/d' \ |
209 |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb\/mods-enabled/d' \ |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb\/mods-enabled/d' \ |
210 |
> %{name}-%{version}-%{release}-filelist |
> %{name}-%{version}-%{release}-filelist |
212 |
|
|
213 |
%pre |
%pre |
214 |
/sbin/e-smith/create-system-user stunnel %{stunnelid} \ |
/sbin/e-smith/create-system-user stunnel %{stunnelid} \ |
215 |
'chrooted stunnel user user' /var/log/imap/ssl /bin/false |
'chrooted stunnel user user' /var/log/stunnel/ssl /bin/false |
|
|
|
|
%clean |
|
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|
|
%files -f %{name}-%{version}-%{release}-filelist |
|
|
%defattr(-,root,root) |
|
|
|
|
|
%pre |
|
216 |
if [ $1 -gt 1 ] ; then |
if [ $1 -gt 1 ] ; then |
217 |
if [ -e /var/service/radiusd/run ] ; then |
if [ -e /var/service/radiusd/run ] ; then |
218 |
/usr/bin/sv d radiusd |
/usr/bin/sv d radiusd |
219 |
/usr/bin/sv d radiusd/log |
/usr/bin/sv d radiusd/log |
220 |
fi |
fi |
221 |
if [ -e /var/service/radiusd ] ; then |
if [ -e /var/service/radiusd ] ; then |
222 |
rm -rf /var/service/radiusd |
rm -rf /var/service/radiusd >/dev/null 2>&1 |
223 |
fi |
fi |
224 |
|
|
225 |
fi |
fi |
226 |
|
|
227 |
|
|
228 |
|
%clean |
229 |
|
rm -rf $RPM_BUILD_ROOT |
230 |
|
|
231 |
|
%files -f %{name}-%{version}-%{release}-filelist |
232 |
|
%defattr(-,root,root) |
233 |
|
|
234 |
|
|