/[smeserver]/rpms/e-smith-apache/sme10/e-smith-apache-2.6.0-bz11123-bz11111-systemd-update.patch
ViewVC logotype

Annotation of /rpms/e-smith-apache/sme10/e-smith-apache-2.6.0-bz11123-bz11111-systemd-update.patch

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


Revision 1.1 - (hide annotations) (download)
Fri Dec 11 02:44:24 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
* Wed Dec 09 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-12.sme
- create-update event [SME: 11123]
- move httpd-e-smith to systemd [SME: 11111]
  changed sigusr1 used in events to reload as defined in the unit file
- give a logger to httpd-e-smith : journald [SME: 1416]

1 jpp 1.1 diff -Nur e-smith-apache-2.6.0.old/createlinks e-smith-apache-2.6.0/createlinks
2     --- e-smith-apache-2.6.0.old/createlinks 2016-02-04 13:27:55.000000000 -0500
3     +++ e-smith-apache-2.6.0/createlinks 2020-12-10 21:39:23.603000000 -0500
4     @@ -1,6 +1,14 @@
5     #!/usr/bin/perl -w
6    
7     use esmith::Build::CreateLinks qw(:all);
8     +#--------------------------------------------------
9     +# actions for e-smith-apache-update
10     +#--------------------------------------------------
11     +my $event = "e-smith-apache-update";
12     +templates2events("/etc/httpd/conf/httpd.conf", $event);
13     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
14     +event_link("systemd-reload", $event, "89");
15     +event_link("systemd-default", $event, "88");
16    
17     #--------------------------------------------------
18     # actions for console-save event
19     @@ -25,7 +33,7 @@
20     $event = "domain-create";
21    
22     templates2events("/etc/httpd/conf/httpd.conf", $event);
23     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
24     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
25    
26     #--------------------------------------------------
27     # actions for domain-delete event
28     @@ -34,7 +42,7 @@
29     $event = "domain-delete";
30    
31     templates2events("/etc/httpd/conf/httpd.conf", $event);
32     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
33     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
34    
35     #--------------------------------------------------
36     # actions for domain-modify event
37     @@ -43,7 +51,7 @@
38     $event = "domain-modify";
39    
40     templates2events("/etc/httpd/conf/httpd.conf", $event);
41     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
42     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
43    
44     #--------------------------------------------------
45     # actions for host-create event
46     @@ -52,7 +60,7 @@
47     $event = "host-create";
48    
49     templates2events("/etc/httpd/conf/httpd.conf", $event);
50     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
51     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
52    
53     #--------------------------------------------------
54     # actions for host-delete event
55     @@ -61,7 +69,7 @@
56     $event = "host-delete";
57    
58     templates2events("/etc/httpd/conf/httpd.conf", $event);
59     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
60     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
61    
62     #--------------------------------------------------
63     # actions for host-modify event
64     @@ -70,7 +78,7 @@
65     $event = "host-modify";
66    
67     templates2events("/etc/httpd/conf/httpd.conf", $event);
68     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
69     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
70    
71     #--------------------------------------------------
72     # actions for ibay-create event
73     @@ -79,7 +87,7 @@
74     $event = "ibay-create";
75    
76     templates2events("/etc/httpd/conf/httpd.conf", $event);
77     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
78     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
79    
80     #--------------------------------------------------
81     # actions for ibay-delete event
82     @@ -88,7 +96,7 @@
83     $event = "ibay-delete";
84    
85     templates2events("/etc/httpd/conf/httpd.conf", $event);
86     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
87     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
88    
89     #--------------------------------------------------
90     # actions for ibay-modify event
91     @@ -98,7 +106,7 @@
92     $event = "ibay-modify";
93    
94     templates2events("/etc/httpd/conf/httpd.conf", $event);
95     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
96     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
97    
98     #--------------------------------------------------
99     # actions for ibay-modify-servers event
100     @@ -108,7 +116,7 @@
101     $event = "ibay-modify-servers";
102    
103     templates2events("/etc/httpd/conf/httpd.conf", $event);
104     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
105     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
106    
107     #--------------------------------------------------
108     # actions for network-create event
109     @@ -117,7 +125,7 @@
110     $event = "network-create";
111    
112     templates2events("/etc/httpd/conf/httpd.conf", $event);
113     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
114     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
115    
116     #--------------------------------------------------
117     # actions for network-delete event
118     @@ -126,7 +134,7 @@
119     $event = "network-delete";
120    
121     templates2events("/etc/httpd/conf/httpd.conf", $event);
122     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
123     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
124    
125     #--------------------------------------------------
126     # actions for remoteaccess-update event
127     @@ -135,7 +143,7 @@
128     $event = "remoteaccess-update";
129    
130     templates2events("/etc/httpd/conf/httpd.conf", $event);
131     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
132     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
133    
134     #--------------------------------------------------
135     # actions for email-update event
136     @@ -144,7 +152,7 @@
137     $event = "email-update";
138    
139     templates2events("/etc/httpd/conf/httpd.conf", $event);
140     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
141     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
142    
143     #--------------------------------------------------
144     # actions for logrotate event
145     @@ -152,7 +160,7 @@
146    
147     $event = "logrotate";
148    
149     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
150     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
151    
152     #--------------------------------------------------
153     # actions for ssl-update event
154     @@ -160,16 +168,8 @@
155    
156     $event = "ssl-update";
157     templates2events("/etc/httpd/conf/httpd.conf", $event);
158     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
159     -
160     -#--------------------------------------------------
161     -# set up daemontools
162     -#--------------------------------------------------
163     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
164    
165     -safe_symlink("daemontools", "root/etc/rc.d/init.d/httpd-e-smith");
166     -service_link_enhanced("httpd-e-smith", "S86", "7");
167     -service_link_enhanced("httpd-e-smith", "K15", "6");
168     -service_link_enhanced("httpd-e-smith", "K15", "0");
169    
170     # Set up generic logfile timestamp renaming/symlinking
171    
172     diff -Nur e-smith-apache-2.6.0.old/root/sbin/e-smith/systemd/httpd-e-smith-prepare e-smith-apache-2.6.0/root/sbin/e-smith/systemd/httpd-e-smith-prepare
173     --- e-smith-apache-2.6.0.old/root/sbin/e-smith/systemd/httpd-e-smith-prepare 1969-12-31 19:00:00.000000000 -0500
174     +++ e-smith-apache-2.6.0/root/sbin/e-smith/systemd/httpd-e-smith-prepare 2020-12-09 23:51:58.296000000 -0500
175     @@ -0,0 +1,13 @@
176     +#!/bin/sh
177     +#----------------------------------------------------------------------
178     +# copyright (C) 1999-2005 Mitel Networks Corporation
179     +#----------------------------------------------------------------------
180     +
181     +if ! test -e /home/e-smith/files/ibays/Primary/html
182     +then
183     + # Make sure that DocumentRoot directory exists
184     + mkdir -p /home/e-smith/files/ibays/Primary/html
185     + chown admin.shared /home/e-smith/files/ibays/Primary/html
186     + chmod 02750 /home/e-smith/files/ibays/Primary/html
187     +fi
188     +
189     diff -Nur e-smith-apache-2.6.0.old/root/usr/lib/systemd/system/httpd-e-smith.service e-smith-apache-2.6.0/root/usr/lib/systemd/system/httpd-e-smith.service
190     --- e-smith-apache-2.6.0.old/root/usr/lib/systemd/system/httpd-e-smith.service 1969-12-31 19:00:00.000000000 -0500
191     +++ e-smith-apache-2.6.0/root/usr/lib/systemd/system/httpd-e-smith.service 2020-12-09 23:52:30.379000000 -0500
192     @@ -0,0 +1,26 @@
193     +[Unit]
194     +Description=httpd-e-smith The Koozali SME Server Apache HTTP Service
195     +After=network.target remote-fs.target nss-lookup.target
196     +Documentation=man:httpd(8)
197     +Documentation=man:apachectl(8)
198     +
199     +[Service]
200     +Type=notify
201     +EnvironmentFile=/etc/sysconfig/httpd
202     +ExecStartPre=/sbin/e-smith/service-status httpd-e-smith
203     +ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
204     +ExecStartPre=/sbin/e-smith/systemd/httpd-e-smith-prepare
205     +ExecStart=/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -DFOREGROUND
206     +ExecReload=/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -k graceful
207     +ExecStop=/bin/kill -WINCH ${MAINPID}
208     +# We want systemd to give httpd some time to finish gracefully, but still want
209     +# it to kill httpd after TimeoutStopSec if something went wrong during the
210     +# graceful stop. Normally, Systemd sends SIGTERM signal right after the
211     +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
212     +# httpd time to finish.
213     +KillSignal=SIGCONT
214     +PrivateTmp=true
215     +
216     +[Install]
217     +WantedBy=sme-server.target
218     +

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