1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/createlinks smeserver-fail2ban-0.1.18/createlinks |
2 |
|
|
--- smeserver-fail2ban-0.1.18.old/createlinks 2022-07-29 22:37:24.969000000 -0400 |
3 |
|
|
+++ smeserver-fail2ban-0.1.18/createlinks 2022-07-29 23:04:07.547000000 -0400 |
4 |
|
|
@@ -9,6 +9,8 @@ |
5 |
|
|
|
6 |
|
|
foreach my $file (qw( |
7 |
|
|
/etc/systemd/system-preset/49-koozali.preset |
8 |
|
|
+ /etc/backup-data.d/smeserver-fail2ban.include |
9 |
|
|
+ /etc/e-smith/templates/etc/dar/DailyBackup.dcf |
10 |
|
|
)) |
11 |
|
|
{ |
12 |
|
|
templates2events( $file, $event ); |
13 |
|
|
diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin |
14 |
|
|
--- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 1969-12-31 19:00:00.000000000 -0500 |
15 |
|
|
+++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 2022-07-29 22:59:07.986000000 -0400 |
16 |
|
|
@@ -0,0 +1,20 @@ |
17 |
|
|
+#Only non rpm owned files are backupe there |
18 |
|
|
+{ |
19 |
|
|
+use RPM2; |
20 |
|
|
+my $rpm_db = RPM2->open_rpm_db(); |
21 |
|
|
+ |
22 |
|
|
+my @dirs = qw(/etc/fail2ban/action.d |
23 |
|
|
+/etc/fail2ban/fail2ban.d |
24 |
|
|
+/etc/fail2ban/filter.d |
25 |
|
|
+/etc/fail2ban/jail.d |
26 |
|
|
+); |
27 |
|
|
+ |
28 |
|
|
+foreach my $some_dir (@dirs) { |
29 |
|
|
+ opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!"; |
30 |
|
|
+ while ( (my $file = readdir $dh) ) { |
31 |
|
|
+ next if $file =~ /^\.{1,2}$/; |
32 |
|
|
+ $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file"); |
33 |
|
|
+ } |
34 |
|
|
+ closedir $dh; |
35 |
|
|
+} |
36 |
|
|
+} |
37 |
|
|
diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban |
38 |
|
|
--- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban 1969-12-31 19:00:00.000000000 -0500 |
39 |
|
|
+++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban 2022-07-29 23:02:58.224000000 -0400 |
40 |
|
|
@@ -0,0 +1,22 @@ |
41 |
|
|
+#Only non rpm owned files are backupe there |
42 |
|
|
+{ |
43 |
|
|
+use RPM2; |
44 |
|
|
+my $rpm_db = RPM2->open_rpm_db(); |
45 |
|
|
+ |
46 |
|
|
+my @dirs = qw(/etc/fail2ban/action.d |
47 |
|
|
+/etc/fail2ban/fail2ban.d |
48 |
|
|
+/etc/fail2ban/filter.d |
49 |
|
|
+/etc/fail2ban/jail.d |
50 |
|
|
+); |
51 |
|
|
+ |
52 |
|
|
+foreach my $some_dir (@dirs) { |
53 |
|
|
+ opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!"; |
54 |
|
|
+ while ( (my $file = readdir $dh) ) { |
55 |
|
|
+ next if $file =~ /^\.{1,2}$/; |
56 |
|
|
+ my $backdir = $some_dir =~ s/^\///; |
57 |
|
|
+ $OUT .= "--go-into $backdir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file"); |
58 |
|
|
+ } |
59 |
|
|
+ closedir $dh; |
60 |
|
|
+} |
61 |
|
|
+} |
62 |
|
|
+ |