1 |
brianr |
1.1 |
diff -urN smeserver-fail2ban-0.1.18.old/createlinks smeserver-fail2ban-0.1.18/createlinks |
2 |
|
|
--- smeserver-fail2ban-0.1.18.old/createlinks 2021-04-19 10:45:41.579129579 +0100 |
3 |
|
|
+++ smeserver-fail2ban-0.1.18/createlinks 2021-04-19 10:54:24.645242584 +0100 |
4 |
|
|
@@ -2,11 +2,35 @@ |
5 |
|
|
|
6 |
|
|
use esmith::Build::CreateLinks qw(:all); |
7 |
|
|
|
8 |
|
|
+# Koozali event specific for updating with yum without reboot |
9 |
|
|
+$event = "smeserver-fail2ban-update"; |
10 |
|
|
+#add here the path to your templates needed to expand |
11 |
|
|
+#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event |
12 |
|
|
+ |
13 |
|
|
+foreach my $file (qw( |
14 |
|
|
+ /etc/systemd/system-preset/49-koozali.preset |
15 |
|
|
+)) |
16 |
|
|
+{ |
17 |
|
|
+ templates2events( $file, $event ); |
18 |
|
|
+} |
19 |
|
|
+ |
20 |
|
|
+#action needed in case we have a systemd unit |
21 |
|
|
+event_link("systemd-default", $event, "10"); |
22 |
|
|
+event_link("systemd-reload", $event, "50"); |
23 |
|
|
+ |
24 |
|
|
+#action specific to this package |
25 |
|
|
+#event_link("some event", $event, "30"); |
26 |
|
|
+#services we need to restart |
27 |
|
|
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/masq"); |
28 |
|
|
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/fail2ban"); |
29 |
|
|
+#and Server Manager panel link |
30 |
|
|
+ |
31 |
|
|
panel_link("fail2ban", "manager"); |
32 |
|
|
|
33 |
|
|
templates2events("/etc/rc.d/init.d/masq", "fail2ban-update"); |
34 |
|
|
+templates2events("/etc/rc.d/init.d/masq", "smeserver-fail2ban-update"); |
35 |
|
|
|
36 |
|
|
-foreach my $event qw(fail2ban-conf bootstrap-console-save){ |
37 |
|
|
+foreach my $event qw(smeserver-fail2ban-update fail2ban-conf bootstrap-console-save){ |
38 |
|
|
templates2events("/etc/fail2ban/jail.conf", "$event"); |
39 |
|
|
templates2events("/etc/fail2ban/fail2ban.conf", "$event"); |
40 |
|
|
templates2events("/etc/logrotate.d/fail2ban", "$event"); |
41 |
|
|
@@ -24,6 +48,6 @@ |
42 |
|
|
|
43 |
|
|
safe_touch("root/var/log/fail2ban/daemon.log"); |
44 |
|
|
|
45 |
|
|
-service_link_enhanced("fail2ban", "S99", "7"); |
46 |
|
|
-service_link_enhanced("fail2ban", "K08", "6"); |
47 |
|
|
-service_link_enhanced("fail2ban", "K08", "0"); |
48 |
|
|
+#service_link_enhanced("fail2ban", "S99", "7"); |
49 |
|
|
+#service_link_enhanced("fail2ban", "K08", "6"); |
50 |
|
|
+#service_link_enhanced("fail2ban", "K08", "0"); |