1 |
brianr |
1.1 |
diff -urN smeserver-hylafax-0.9.old/createlinks smeserver-hylafax-0.9/createlinks |
2 |
|
|
--- smeserver-hylafax-0.9.old/createlinks 2021-10-12 14:11:33.638318451 +0100 |
3 |
|
|
+++ smeserver-hylafax-0.9/createlinks 2021-10-14 13:20:38.661740009 +0100 |
4 |
|
|
@@ -1,26 +1,29 @@ |
5 |
|
|
#! /usr/bin/perl -w |
6 |
|
|
use esmith::Build::CreateLinks qw(:all); |
7 |
|
|
# our event specific for updating with yum without reboot |
8 |
|
|
-my $event = 'smeserver-hylafax-update'; |
9 |
|
|
#add here the path to your templates needed to expand |
10 |
|
|
#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all your yum update event |
11 |
|
|
|
12 |
|
|
-foreach my $file (qw( |
13 |
|
|
- /etc/systemd/system-preset/49-koozali.preset |
14 |
|
|
- /etc/hylafax/hyla.conf |
15 |
|
|
- /usr/lib/systemd/system/hylafax.service |
16 |
|
|
-)) |
17 |
|
|
-{ |
18 |
|
|
- templates2events( $file, $event ); |
19 |
|
|
+foreach my $event (qw(smeserver-hylafax-update smeserver-hylafax-restart)) { |
20 |
|
|
+ foreach my $file (qw( |
21 |
|
|
+ /etc/systemd/system-preset/49-koozali.preset |
22 |
|
|
+ /usr/lib/systemd/system/hylafax.service |
23 |
|
|
+ )) |
24 |
|
|
+ { |
25 |
|
|
+ templates2events( $file, $event ); |
26 |
|
|
+ } |
27 |
|
|
+ #action needed in case we have a systemd unit |
28 |
|
|
+ event_link('systemd-default', $event, '10'); |
29 |
|
|
+ event_link('systemd-reload', $event, '50'); |
30 |
|
|
+ #services we need to restart |
31 |
|
|
+ safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax"); |
32 |
|
|
} |
33 |
|
|
-#action needed in case we have a systemd unit |
34 |
|
|
-event_link('systemd-default', $event, '10'); |
35 |
|
|
-event_link('systemd-reload', $event, '50'); |
36 |
|
|
-#action specific to this package |
37 |
|
|
+ |
38 |
|
|
+#Then extra template expansion for the update event - not in restart as faxsetup also writes to conf file |
39 |
|
|
+templates2events("/etc/hylafax/hyla.conf",qw(smeserver-hylafax-update)); |
40 |
|
|
+ |
41 |
|
|
#event_link('action', $event, '30'); |
42 |
|
|
#services we need to restart |
43 |
|
|
-safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax"); |
44 |
|
|
-#safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax-faxgetty"); - not needed apparently |
45 |
|
|
|
46 |
|
|
#and Server Manager panel link |
47 |
|
|
#panel_link('somefunction', 'manager'); |