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 |
jpp |
1.3 |
diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule15 e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule15 |
173 |
|
|
--- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule15 1969-12-31 19:00:00.000000000 -0500 |
174 |
|
|
+++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule15 2020-12-10 22:05:18.367000000 -0500 |
175 |
|
|
@@ -0,0 +1,3 @@ |
176 |
|
|
+# notify for systemd |
177 |
|
|
+LoadModule systemd_module modules/mod_systemd.so |
178 |
|
|
+ |
179 |
jpp |
1.1 |
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 |
180 |
|
|
--- e-smith-apache-2.6.0.old/root/sbin/e-smith/systemd/httpd-e-smith-prepare 1969-12-31 19:00:00.000000000 -0500 |
181 |
|
|
+++ e-smith-apache-2.6.0/root/sbin/e-smith/systemd/httpd-e-smith-prepare 2020-12-09 23:51:58.296000000 -0500 |
182 |
|
|
@@ -0,0 +1,13 @@ |
183 |
|
|
+#!/bin/sh |
184 |
|
|
+#---------------------------------------------------------------------- |
185 |
|
|
+# copyright (C) 1999-2005 Mitel Networks Corporation |
186 |
|
|
+#---------------------------------------------------------------------- |
187 |
|
|
+ |
188 |
|
|
+if ! test -e /home/e-smith/files/ibays/Primary/html |
189 |
|
|
+then |
190 |
|
|
+ # Make sure that DocumentRoot directory exists |
191 |
|
|
+ mkdir -p /home/e-smith/files/ibays/Primary/html |
192 |
|
|
+ chown admin.shared /home/e-smith/files/ibays/Primary/html |
193 |
|
|
+ chmod 02750 /home/e-smith/files/ibays/Primary/html |
194 |
|
|
+fi |
195 |
|
|
+ |
196 |
|
|
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 |
197 |
|
|
--- e-smith-apache-2.6.0.old/root/usr/lib/systemd/system/httpd-e-smith.service 1969-12-31 19:00:00.000000000 -0500 |
198 |
|
|
+++ e-smith-apache-2.6.0/root/usr/lib/systemd/system/httpd-e-smith.service 2020-12-09 23:52:30.379000000 -0500 |
199 |
|
|
@@ -0,0 +1,26 @@ |
200 |
|
|
+[Unit] |
201 |
|
|
+Description=httpd-e-smith The Koozali SME Server Apache HTTP Service |
202 |
jpp |
1.4 |
+After=network-online.target remote-fs.target |
203 |
jpp |
1.1 |
+Documentation=man:httpd(8) |
204 |
|
|
+Documentation=man:apachectl(8) |
205 |
|
|
+ |
206 |
|
|
+[Service] |
207 |
|
|
+Type=notify |
208 |
|
|
+EnvironmentFile=/etc/sysconfig/httpd |
209 |
|
|
+ExecStartPre=/sbin/e-smith/service-status httpd-e-smith |
210 |
|
|
+ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
211 |
|
|
+ExecStartPre=/sbin/e-smith/systemd/httpd-e-smith-prepare |
212 |
|
|
+ExecStart=/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -DFOREGROUND |
213 |
|
|
+ExecReload=/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -k graceful |
214 |
|
|
+ExecStop=/bin/kill -WINCH ${MAINPID} |
215 |
|
|
+# We want systemd to give httpd some time to finish gracefully, but still want |
216 |
|
|
+# it to kill httpd after TimeoutStopSec if something went wrong during the |
217 |
|
|
+# graceful stop. Normally, Systemd sends SIGTERM signal right after the |
218 |
|
|
+# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give |
219 |
|
|
+# httpd time to finish. |
220 |
|
|
+KillSignal=SIGCONT |
221 |
|
|
+PrivateTmp=true |
222 |
|
|
+ |
223 |
|
|
+[Install] |
224 |
|
|
+WantedBy=sme-server.target |
225 |
|
|
+ |