/[smecontribs]/rpms/smeserver-sysmon/contribs10/smeserver-sysmon-systemd-11072.patch
ViewVC logotype

Annotation of /rpms/smeserver-sysmon/contribs10/smeserver-sysmon-systemd-11072.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Fri Aug 5 02:29:59 2022 UTC (2 years, 3 months ago) by trevorb
Branch: MAIN
Changes since 1.3: +1 -0 lines
fix typo in patch

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     @@ -0,0 +1,5 @@
55     +
56     +[Service]
57     +ExecStart=
58     +ExecStart=/usr/sbin/sysmon
59     +
60     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
61     --- 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
62     +++ 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
63     @@ -0,0 +1,3 @@
64     +
65     +[Install]
66     +WantedBy=sme-server.target
67     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
68     --- smeserver-sysmon-6.5.old/root/etc/rc.d/init.d/sysmon 2022-08-03 15:59:11.836382422 +1000
69     +++ smeserver-sysmon-6.5/root/etc/rc.d/init.d/sysmon 1970-01-01 10:00:00.000000000 +1000
70     @@ -1,44 +0,0 @@
71     -#!/bin/sh
72     -#
73     -# sysmon: Starts the sysmon daemon
74     -#
75     -# chkconfig: 2345 97 03
76     -# processname: sysmon
77     -
78     -# Source function library.
79     -. /etc/rc.d/init.d/functions
80     -
81     -RETVAL=0
82     -
83     -# See how we were called.
84     -case "$1" in
85     - start)
86     - echo -n "Starting sysmon daemon: "
87     - daemon sysmon
88     - RETVAL=$?
89     - echo
90     - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sysmon
91     - ;;
92     - stop)
93     - echo -n "Stopping sysmon daemon: "
94     - killproc sysmon
95     - RETVAL=$?
96     - rm -f /var/lock/subsys/sysmon && rm -f /var/lock/sysmon
97     - echo
98     - ;;
99     - status)
100     - status sysmon
101     - RETVAL=$?
102     - ;;
103     - restart)
104     - $0 stop
105     - $0 start
106     - RETVAL=$?
107     - ;;
108     - *)
109     - echo "Usage: $0 {start|stop|status|restart}"
110     - exit 1
111     -esac
112     -
113     -exit $RETVAL
114     -
115 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
116     --- smeserver-sysmon-6.5.old/root/usr/lib/systemd/system/sysmon.service 1970-01-01 10:00:00.000000000 +1000
117     +++ smeserver-sysmon-6.5/root/usr/lib/systemd/system/sysmon.service 2022-08-05 12:02:45.000000000 +1000
118     @@ -0,0 +1,12 @@
119 trevorb 1.2 +
120     +[Unit]
121     +Description=System Monitor
122     +After=network-online.target
123     +Wants=network-online.target
124     +
125     +[Service]
126     +ExecStart=
127     +ExecStart=/usr/bin/perl /usr/sbin/sysmon
128     +
129     +[Install]
130     +WantedBy= sme-server.target

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed