Last change
on this file since ca72aba was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
910 bytes
|
Rev | Line | |
---|
[c5c522c] | 1 | config() { |
---|
| 2 | NEW="$1" |
---|
| 3 | OLD="$(dirname $NEW)/$(basename $NEW .new)" |
---|
| 4 | # If there's no config file by that name, mv it over: |
---|
| 5 | if [ ! -r $OLD ]; then |
---|
| 6 | mv $NEW $OLD |
---|
| 7 | elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then |
---|
| 8 | # toss the redundant copy |
---|
| 9 | rm $NEW |
---|
| 10 | fi |
---|
| 11 | # Otherwise, we leave the .new copy for the admin to consider... |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | # Keep same perms on rc.fail2ban.new: |
---|
| 15 | if [ -e etc/rc.d/rc.fail2ban ]; then |
---|
| 16 | cp -a etc/rc.d/rc.fail2ban etc/rc.d/rc.fail2ban.new.incoming |
---|
| 17 | cat etc/rc.d/rc.fail2ban.new > etc/rc.d/rc.fail2ban.new.incoming |
---|
| 18 | mv etc/rc.d/rc.fail2ban.new.incoming etc/rc.d/rc.fail2ban.new |
---|
| 19 | fi |
---|
| 20 | |
---|
| 21 | config etc/rc.d/rc.fail2ban.new |
---|
| 22 | config etc/logrotate.d/fail2ban.new |
---|
| 23 | config etc/fail2ban/fail2ban.conf.new |
---|
| 24 | config etc/fail2ban/jail.conf.new |
---|
| 25 | |
---|
| 26 | for conf_file in etc/fail2ban/action.d/*.new; do |
---|
| 27 | config $conf_file |
---|
| 28 | done |
---|
| 29 | for conf_file in etc/fail2ban/filter.d/*.new; do |
---|
| 30 | config $conf_file |
---|
| 31 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.