Pre-create fail2ban log file so it can start the first time

Needed on EL6 version of fail2ban
tags/0.1.6_el5
Daniel Berteaud 11 years ago
parent 58877ee987
commit 8f9f7ba655
  1. 2
      createlinks
  2. 1
      smeserver-fail2ban.spec

@ -18,6 +18,8 @@ safe_symlink("restart", "root/etc/e-smith/events/network-create/services2adjust/
safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/fail2ban"); safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/fail2ban");
safe_symlink("restart", "root/etc/e-smith/events/remoteaccess-update/services2adjust/fail2ban"); safe_symlink("restart", "root/etc/e-smith/events/remoteaccess-update/services2adjust/fail2ban");
safe_touch("root/var/log/fail2ban/daemon.log");
service_link_enhanced("fail2ban", "S92", "7"); service_link_enhanced("fail2ban", "S92", "7");
service_link_enhanced("fail2ban", "K08", "6"); service_link_enhanced("fail2ban", "K08", "6");
service_link_enhanced("fail2ban", "K08", "0"); service_link_enhanced("fail2ban", "K08", "0");

@ -54,6 +54,7 @@ perl createlinks
/bin/rm -f %{name}-%{version}-filelist /bin/rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--dir /var/log/fail2ban 'attr(0750,root,root)' \ --dir /var/log/fail2ban 'attr(0750,root,root)' \
--file /var/log/fail2ban/daemon.log 'config(noreplace) %attr(0600,root,root)' \
--file /etc/cron.daily/cleanup_fail2ban 'attr(0755,root,root)' \ --file /etc/cron.daily/cleanup_fail2ban 'attr(0755,root,root)' \
> %{name}-%{version}-filelist > %{name}-%{version}-filelist

Loading…
Cancel
Save