/[smeserver]/rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz11144-bz11110-systemd-update.patch
ViewVC logotype

Contents of /rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz11144-bz11110-systemd-update.patch

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


Revision 1.2 - (show annotations) (download)
Fri Dec 11 04:12:21 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-manager-2_8_0-33_el7_sme, e-smith-manager-2_8_0-35_el7_sme, e-smith-manager-2_8_0-37_el7_sme, e-smith-manager-2_8_0-32_el7_sme, e-smith-manager-2_8_0-34_el7_sme, e-smith-manager-2_8_0-38_el7_sme, e-smith-manager-2_8_0-36_el7_sme, HEAD
Changes since 1.1: +1 -1 lines
* Thu Dec 10 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.8.0-32.sme
- create -update event [SME: 11144]
- migrate httpd-admin to systemd [SME: 11110]

1 diff -Nur e-smith-manager-2.8.0.old/createlinks e-smith-manager-2.8.0/createlinks
2 --- e-smith-manager-2.8.0.old/createlinks 2020-12-10 22:38:26.769000000 -0500
3 +++ e-smith-manager-2.8.0/createlinks 2020-12-10 22:55:30.899000000 -0500
4 @@ -18,6 +18,7 @@
5 {
6 templates2events("/etc/e-smith/web/common/css/$_", qw(
7 bootstrap-console-save
8 + e-smith-manager-update
9 ));
10 }
11
12 @@ -27,6 +28,7 @@
13 network-create
14 network-delete
15 logrotate
16 + e-smith-manager-update
17 ));
18 templates2events("/etc/e-smith/web/common/head.tmpl", qw(
19 console-save
20 @@ -34,6 +36,7 @@
21 network-create
22 network-delete
23 logrotate
24 + e-smith-manager-update
25 ));
26 templates2events("/etc/e-smith/web/common/foot.tmpl", qw(
27 console-save
28 @@ -41,6 +44,7 @@
29 network-create
30 network-delete
31 logrotate
32 + e-smith-manager-update
33 ));
34
35 # conf-httpd-admin
36 @@ -52,6 +56,7 @@
37 network-delete
38 remoteaccess-update
39 logrotate
40 + e-smith-manager-update
41 ));
42
43 templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", 'bootstrap-console-save');
44 @@ -70,24 +75,17 @@
45
46 foreach (qw(console-save remoteaccess-update logrotate))
47 {
48 - safe_symlink("sigusr1", "root/etc/e-smith/events/$_/services2adjust/httpd-admin");
49 + safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/httpd-admin");
50 }
51
52 -my %service2order =
53 -(
54 - 'httpd-admin' => "86",
55 -);
56 -
57 -foreach my $service (keys %service2order)
58 -{
59 - service_link_enhanced($service, $service2order{$service}, 7);
60 -}
61
62 # Symlink httpd-admin to httpd.
63 safe_symlink("httpd", "root/usr/sbin/httpd-admin");
64
65 -# Set up links to daemontools.
66 -safe_symlink("daemontools", "root/etc/rc.d/init.d/httpd-admin");
67 -service_link_enhanced("httpd-admin", "K15", "6");
68 -service_link_enhanced("httpd-admin", "K15", "0");
69
70 +my $event = "e-smith-manager-update";
71 +
72 +event_link("systemd-reload", $event, "89");
73 +event_link("systemd-default", $event, "88");
74 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-admin");
75 +templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", $event);
76 diff -Nur e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager
77 --- e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager 2020-12-10 22:38:26.775000000 -0500
78 +++ e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager 2020-12-10 22:50:24.172000000 -0500
79 @@ -51,6 +51,7 @@
80 unixd
81 authn_core
82 authz_core
83 + systemd
84 ))
85 {
86 next unless -f "/usr/lib/httpd/modules/mod_${_}.so" ||
87 diff -Nur e-smith-manager-2.8.0.old/root/usr/lib/systemd/system/httpd-admin.service e-smith-manager-2.8.0/root/usr/lib/systemd/system/httpd-admin.service
88 --- e-smith-manager-2.8.0.old/root/usr/lib/systemd/system/httpd-admin.service 1969-12-31 19:00:00.000000000 -0500
89 +++ e-smith-manager-2.8.0/root/usr/lib/systemd/system/httpd-admin.service 2020-12-10 22:47:39.130000000 -0500
90 @@ -0,0 +1,25 @@
91 +[Unit]
92 +Description=httpd-admin The Koozali SME Server Server-Manager web service
93 +After=network.target remote-fs.target
94 +Documentation=man:httpd(8)
95 +Documentation=man:apachectl(8)
96 +
97 +[Service]
98 +Type=notify
99 +EnvironmentFile=/etc/sysconfig/httpd
100 +ExecStartPre=/sbin/e-smith/service-status httpd-admin
101 +ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/admin-conf/httpd.conf
102 +ExecStart=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -DFOREGROUND
103 +ExecReload=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -k graceful
104 +ExecStop=/bin/kill -WINCH ${MAINPID}
105 +# We want systemd to give httpd some time to finish gracefully, but still want
106 +# it to kill httpd after TimeoutStopSec if something went wrong during the
107 +# graceful stop. Normally, Systemd sends SIGTERM signal right after the
108 +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
109 +# httpd time to finish.
110 +KillSignal=SIGCONT
111 +PrivateTmp=true
112 +
113 +[Install]
114 +WantedBy=sme-server.target
115 +

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