1 |
trevorb |
1.1 |
diff -urN smeserver-sysmon-6.5.old/createlinks smeserver-sysmon-6.5/createlinks |
2 |
|
|
--- smeserver-sysmon-6.5.old/createlinks 2022-08-03 15:59:11.836382422 +1000 |
3 |
|
|
+++ smeserver-sysmon-6.5/createlinks 2022-08-03 16:21:21.389855128 +1000 |
4 |
|
|
@@ -4,16 +4,26 @@ |
5 |
|
|
use esmith::Build::Backup qw(:all); |
6 |
|
|
|
7 |
|
|
panel_link("sysmon", "manager"); |
8 |
|
|
+# our event specific for updating with yum without reboot |
9 |
|
|
+$event = 'smeserver-sysmon-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 |
|
|
-service_link_enhanced("sysmon", "K03", "0"); |
14 |
|
|
-service_link_enhanced("sysmon", "K03", "1"); |
15 |
|
|
-service_link_enhanced("sysmon", "S97", "2"); |
16 |
|
|
-service_link_enhanced("sysmon", "S97", "3"); |
17 |
|
|
-service_link_enhanced("sysmon", "S97", "4"); |
18 |
|
|
-service_link_enhanced("sysmon", "S97", "5"); |
19 |
|
|
-service_link_enhanced("sysmon", "K03", "6"); |
20 |
|
|
-service_link_enhanced("sysmon", "S97", "7"); |
21 |
|
|
+foreach my $file (qw( |
22 |
|
|
+ /etc/dar/DailyBackup.dcf |
23 |
|
|
+ /etc/systemd/system-preset/49-koozali.preset |
24 |
|
|
+ /usr/lib/systemd/system/sysmon.service.d/50koozali.conf |
25 |
|
|
+)) |
26 |
|
|
+{ |
27 |
|
|
+ templates2events( $file, $event ); |
28 |
|
|
+}; |
29 |
|
|
+#action needed in case we have a systemd unit |
30 |
|
|
+event_link('systemd-default', $event, '10'); |
31 |
|
|
+event_link('systemd-reload', $event, '50'); |
32 |
|
|
+#services we need to restart |
33 |
|
|
+safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/sysmon"); |
34 |
|
|
|
35 |
|
|
backup_includes("smeserver-sysmon", qw( |
36 |
|
|
/var/lib/rrd/ |
37 |
|
|
-)); |
38 |
|
|
\ No newline at end of file |
39 |
|
|
+)); |
40 |
|
|
+ |
41 |
|
|
diff -urN smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/10Unit smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/10Unit |
42 |
|
|
--- smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/10Unit 1970-01-01 10:00:00.000000000 +1000 |
43 |
|
|
+++ smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/10Unit 2022-08-03 16:10:56.207980079 +1000 |
44 |
|
|
@@ -0,0 +1,6 @@ |
45 |
|
|
+ |
46 |
|
|
+[Unit] |
47 |
|
|
+Description=System Monitor |
48 |
|
|
+After=network-online.target |
49 |
|
|
+Wants=network-online.target |
50 |
trevorb |
1.4 |
+ |
51 |
trevorb |
1.1 |
diff -urN smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/20Service smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/20Service |
52 |
|
|
--- smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/20Service 1970-01-01 10:00:00.000000000 +1000 |
53 |
|
|
+++ smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/20Service 2022-08-03 16:12:26.238523740 +1000 |
54 |
trevorb |
1.7 |
@@ -0,0 +1,8 @@ |
55 |
trevorb |
1.1 |
+ |
56 |
|
|
+[Service] |
57 |
trevorb |
1.6 |
+ExecStartPre= |
58 |
|
|
+ExecStartPre=-/sbin/e-smith/service-status sysmon |
59 |
|
|
+ExecStartPre=-/sbin/e-smith/expand-template /usr/lib/systemd/system/sysmon.service.d/50koozali.conf |
60 |
trevorb |
1.1 |
+ExecStart= |
61 |
trevorb |
1.6 |
+ExecStart=-/usr/sbin/sysmon |
62 |
trevorb |
1.1 |
+ |
63 |
|
|
diff -urN smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/30Install smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/30Install |
64 |
|
|
--- smeserver-sysmon-6.5.old/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/30Install 1970-01-01 10:00:00.000000000 +1000 |
65 |
|
|
+++ smeserver-sysmon-6.5/root/etc/e-smith/templates/usr/lib/systemd/system/sysmon.service.d/50koozali.conf/30Install 2022-08-03 16:11:05.607828018 +1000 |
66 |
trevorb |
1.7 |
@@ -0,0 +1,4 @@ |
67 |
trevorb |
1.1 |
+ |
68 |
|
|
+[Install] |
69 |
|
|
+WantedBy=sme-server.target |
70 |
trevorb |
1.7 |
+ |
71 |
trevorb |
1.1 |
diff -urN smeserver-sysmon-6.5.old/root/etc/rc.d/init.d/sysmon smeserver-sysmon-6.5/root/etc/rc.d/init.d/sysmon |
72 |
|
|
--- smeserver-sysmon-6.5.old/root/etc/rc.d/init.d/sysmon 2022-08-03 15:59:11.836382422 +1000 |
73 |
|
|
+++ smeserver-sysmon-6.5/root/etc/rc.d/init.d/sysmon 1970-01-01 10:00:00.000000000 +1000 |
74 |
|
|
@@ -1,44 +0,0 @@ |
75 |
|
|
-#!/bin/sh |
76 |
|
|
-# |
77 |
|
|
-# sysmon: Starts the sysmon daemon |
78 |
|
|
-# |
79 |
|
|
-# chkconfig: 2345 97 03 |
80 |
|
|
-# processname: sysmon |
81 |
|
|
- |
82 |
|
|
-# Source function library. |
83 |
|
|
-. /etc/rc.d/init.d/functions |
84 |
|
|
- |
85 |
|
|
-RETVAL=0 |
86 |
|
|
- |
87 |
|
|
-# See how we were called. |
88 |
|
|
-case "$1" in |
89 |
|
|
- start) |
90 |
|
|
- echo -n "Starting sysmon daemon: " |
91 |
|
|
- daemon sysmon |
92 |
|
|
- RETVAL=$? |
93 |
|
|
- echo |
94 |
|
|
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sysmon |
95 |
|
|
- ;; |
96 |
|
|
- stop) |
97 |
|
|
- echo -n "Stopping sysmon daemon: " |
98 |
|
|
- killproc sysmon |
99 |
|
|
- RETVAL=$? |
100 |
|
|
- rm -f /var/lock/subsys/sysmon && rm -f /var/lock/sysmon |
101 |
|
|
- echo |
102 |
|
|
- ;; |
103 |
|
|
- status) |
104 |
|
|
- status sysmon |
105 |
|
|
- RETVAL=$? |
106 |
|
|
- ;; |
107 |
|
|
- restart) |
108 |
|
|
- $0 stop |
109 |
|
|
- $0 start |
110 |
|
|
- RETVAL=$? |
111 |
|
|
- ;; |
112 |
|
|
- *) |
113 |
|
|
- echo "Usage: $0 {start|stop|status|restart}" |
114 |
|
|
- exit 1 |
115 |
|
|
-esac |
116 |
|
|
- |
117 |
|
|
-exit $RETVAL |
118 |
|
|
- |
119 |
trevorb |
1.3 |
diff -urN smeserver-sysmon-6.5.old/root/usr/lib/systemd/system/sysmon.service smeserver-sysmon-6.5/root/usr/lib/systemd/system/sysmon.service |
120 |
|
|
--- smeserver-sysmon-6.5.old/root/usr/lib/systemd/system/sysmon.service 1970-01-01 10:00:00.000000000 +1000 |
121 |
|
|
+++ smeserver-sysmon-6.5/root/usr/lib/systemd/system/sysmon.service 2022-08-05 12:02:45.000000000 +1000 |
122 |
trevorb |
1.7 |
@@ -0,0 +1,16 @@ |
123 |
trevorb |
1.2 |
+ |
124 |
|
|
+[Unit] |
125 |
|
|
+Description=System Monitor |
126 |
|
|
+After=network-online.target |
127 |
|
|
+Wants=network-online.target |
128 |
|
|
+ |
129 |
|
|
+[Service] |
130 |
trevorb |
1.6 |
+ExecStartPre= |
131 |
|
|
+ExecStartPre=-/sbin/e-smith/service-status sysmon |
132 |
|
|
+ExecStartPre=-/sbin/e-smith/expand-template /usr/lib/systemd/system/sysmon.service.d/50koozali.conf |
133 |
trevorb |
1.2 |
+ExecStart= |
134 |
trevorb |
1.6 |
+ExecStart=-/usr/sbin/sysmon |
135 |
|
|
+ |
136 |
trevorb |
1.2 |
+[Install] |
137 |
|
|
+WantedBy= sme-server.target |
138 |
trevorb |
1.5 |
+ |
139 |
|
|
diff -urN smeserver-sysmon-6.5.old/root/usr/lib/systemd/system/sysmon.service.d/50koozali.conf smeserver-sysmon-6.5/root/usr/lib/systemd/system/sysmon.service.d/50koozali.conf |
140 |
|
|
--- smeserver-sysmon-6.5.old/root/usr/lib/systemd/system/sysmon.service.d/50koozali.conf 1970-01-01 10:00:00.000000000 +1000 |
141 |
|
|
+++ smeserver-sysmon-6.5/root/usr/lib/systemd/system/sysmon.service.d/50koozali.conf 2022-08-05 12:02:45.000000000 +1000 |
142 |
trevorb |
1.7 |
@@ -0,0 +1,16 @@ |
143 |
trevorb |
1.5 |
+ |
144 |
|
|
+[Unit] |
145 |
|
|
+Description=System Monitor |
146 |
|
|
+After=network-online.target |
147 |
|
|
+Wants=network-online.target |
148 |
|
|
+ |
149 |
|
|
+[Service] |
150 |
trevorb |
1.6 |
+ExecStartPre= |
151 |
|
|
+ExecStartPre=-/sbin/e-smith/service-status sysmon |
152 |
|
|
+ExecStartPre=-/sbin/e-smith/expand-template /usr/lib/systemd/system/sysmon.service.d/50koozali.conf |
153 |
trevorb |
1.5 |
+ExecStart= |
154 |
trevorb |
1.6 |
+ExecStart=-/usr/sbin/sysmon |
155 |
trevorb |
1.5 |
+ |
156 |
|
|
+[Install] |
157 |
|
|
+WantedBy= sme-server.target |
158 |
|
|
+ |