1 |
# $Id: e-smith-radiusd.spec,v 1.9 2019/12/19 06:00:24 jpp Exp $ |
# $Id: e-smith-radiusd.spec,v 1.11 2020/12/09 02:38:43 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 |
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 |
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)' \ |
|
208 |
--dir /var/log/radiusd 'attr(0755,smelog,smelog)' \ |
--dir /var/log/radiusd 'attr(0755,smelog,smelog)' \ |
209 |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb/d' \ |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb/d' \ |
210 |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb\/mods-enabled/d' \ |
|sed -e '/%dir %attr(0755,root,root) \/etc\/raddb\/mods-enabled/d' \ |
213 |
|
|
214 |
%pre |
%pre |
215 |
/sbin/e-smith/create-system-user stunnel %{stunnelid} \ |
/sbin/e-smith/create-system-user stunnel %{stunnelid} \ |
216 |
'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 |
|
217 |
if [ $1 -gt 1 ] ; then |
if [ $1 -gt 1 ] ; then |
218 |
if [ -e /var/service/radiusd/run ] ; then |
if [ -e /var/service/radiusd/run ] ; then |
219 |
/usr/bin/sv d radiusd |
/usr/bin/sv d radiusd |
220 |
/usr/bin/sv d radiusd/log |
/usr/bin/sv d radiusd/log |
221 |
fi |
fi |
222 |
if [ -e /var/service/radiusd ] ; then |
if [ -e /var/service/radiusd ] ; then |
223 |
rm -rf /var/service/radiusd |
rm -rf /var/service/radiusd >/dev/null 2>&1 |
224 |
fi |
fi |
225 |
|
|
226 |
fi |
fi |
227 |
|
|
228 |
|
|
229 |
|
%clean |
230 |
|
rm -rf $RPM_BUILD_ROOT |
231 |
|
|
232 |
|
%files -f %{name}-%{version}-%{release}-filelist |
233 |
|
%defattr(-,root,root) |
234 |
|
|
235 |
|
|