/[smecontribs]/rpms/smeserver-phpki-ng/contribs10/smeserver-phpki-ng-0.3-Add-in-systemd-startup.patch
ViewVC logotype

Contents of /rpms/smeserver-phpki-ng/contribs10/smeserver-phpki-ng-0.3-Add-in-systemd-startup.patch

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


Revision 1.1 - (show annotations) (download)
Sat Feb 13 11:52:39 2021 UTC (3 years, 9 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-phpki-ng-0_3-5_el7_sme, smeserver-phpki-ng-0_3-3_el7_sme, smeserver-phpki-ng-0_3-4_el7_sme, smeserver-phpki-ng-0_3-2_el7_sme
* Tue Feb 09 2021 Brian Read <brianr@bjsystems.co.uk> 0.3-3.sme
- Add-in-systemd-startup [SME: 11207]

1 diff -urN smeserver-phpki-ng-0.3.old/createlinks smeserver-phpki-ng-0.3/createlinks
2 --- smeserver-phpki-ng-0.3.old/createlinks 2013-11-11 17:05:11.000000000 +0000
3 +++ smeserver-phpki-ng-0.3/createlinks 2021-02-11 09:29:42.620507032 +0000
4 @@ -4,13 +4,13 @@
5
6 # Start and stop links
7
8 -service_link_enhanced("httpd-pki", "S86", "7");
9 -service_link_enhanced("httpd-pki", "K15", "6");
10 -service_link_enhanced("httpd-pki", "K15", "0");
11 -service_link_enhanced("httpd-pki", "K15", "1");
12 +#service_link_enhanced("httpd-pki", "S86", "7");
13 +#service_link_enhanced("httpd-pki", "K15", "6");
14 +#service_link_enhanced("httpd-pki", "K15", "0");
15 +#service_link_enhanced("httpd-pki", "K15", "1");
16
17 -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-pki');
18 -safe_symlink("/var/service/httpd-pki" , 'root/service/httpd-pki');
19 +#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-pki');
20 +#safe_symlink("/var/service/httpd-pki" , 'root/service/httpd-pki');
21
22 # Panel links
23
24 @@ -27,3 +27,28 @@
25 safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/pki_error_log");
26 safe_touch("root/var/service/httpd-pki/down");
27
28 +# our event specific for updating with yum without reboot
29 +$event = "smeserver-phpki-ng-update";
30 +#add here the path to your templates needed to expand
31 +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
32 +
33 +foreach my $file (qw(
34 + /etc/systemd/system-preset/49-koozali.preset
35 + /etc/httpd/conf/httpd.conf
36 + /etc/httpd/pki-conf/httpd.conf
37 +
38 +))
39 +{
40 + templates2events( $file, $event );
41 +}
42 +
43 +#action needed in case we have a systemd unit
44 +event_link("systemd-default", $event, "10");
45 +event_link("systemd-reload", $event, "50");
46 +
47 +#action specific to this package
48 +#event_link("conf-timezone", $event, "30");
49 +#services we need to restart
50 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-pki");
51 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
52 +
53 diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass
54 --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2008-11-27 03:57:13.000000000 +0000
55 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2021-02-13 09:55:10.685514336 +0000
56 @@ -1,6 +1,7 @@
57 {
58 # vim: ft=perl:
59
60 +
61 $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
62
63 $OUT = '';
64 @@ -16,6 +17,14 @@
65
66 $OUT .=<<"HERE";
67
68 + LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
69 + LoadModule proxy_connect_module modules/mod_proxy_connect.so
70 + LoadModule proxy_express_module modules/mod_proxy_express.so
71 + LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
72 + LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
73 + LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
74 + LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
75 +
76 <Location /phpki>
77 SSLRequireSSL on
78 order deny,allow
79 diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules
80 --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules 2020-12-24 07:30:34.731241382 +0000
81 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/20Modules 2021-02-13 11:00:46.430734768 +0000
82 @@ -10,8 +10,10 @@
83 ServerRoot /etc/httpd
84 ServerTokens ProductOnly
85
86 -User phpki
87 -Group phpki
88 +User www
89 +Group www
90 +#User phpki
91 +#Group phpki
92
93 ErrorLog /var/log/httpd/pki_error_log
94 LogLevel warn
95 @@ -28,7 +30,7 @@
96 autoindex
97 dir
98 asis
99 - imap
100 +# imap
101 imagemap
102 actions
103 userdir
104 @@ -36,9 +38,9 @@
105 proxy_http
106 alias
107 rewrite
108 - access
109 - authz_host
110 - authz_user
111 +# access
112 +# authz_host
113 +# authz_user
114 auth
115 auth_anon
116 auth_digest
117 @@ -53,6 +55,14 @@
118 access_compat
119 authn_core
120 authz_core
121 + proxy_ajp
122 + proxy_connect
123 + proxy_express
124 + proxy_fcgi
125 + proxy_ftp
126 + proxy_html
127 + proxy_scgi
128 + proxy_wstunnel
129 ))
130 {
131 next unless -f "/usr/lib/httpd/modules/mod_${_}.so" ||
132 diff -urN smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki
133 --- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki 2020-04-03 11:00:40.000000000 +0100
134 +++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/pki-conf/httpd.conf/90phpki 2021-02-09 12:33:57.076075986 +0000
135 @@ -5,6 +5,9 @@
136 <Directory /opt/phpki/html>
137 AddType application/x-httpd-php .php
138 Options FollowSymLinks
139 +<FilesMatch .php$>
140 + SetHandler "proxy:unix:/var/run/php-fpm/php73.sock|fcgi://localhost"
141 +</FilesMatch>
142 php_flag register_globals off
143 php_flag register_long_arrays on
144 php_admin_value session.save_path /var/lib/php/pki-session
145 diff -urN smeserver-phpki-ng-0.3.old/root/etc/httpd/pki-conf/httpd.conf smeserver-phpki-ng-0.3/root/etc/httpd/pki-conf/httpd.conf
146 --- smeserver-phpki-ng-0.3.old/root/etc/httpd/pki-conf/httpd.conf 2020-12-24 07:30:34.731241382 +0000
147 +++ smeserver-phpki-ng-0.3/root/etc/httpd/pki-conf/httpd.conf 2021-02-09 12:32:41.696410122 +0000
148 @@ -14,7 +14,7 @@
149 TKTAuthSecret "1234"
150
151
152 -Listen 127.0.0.1:950
153 +Listen 127.0.0.1:940
154
155 HostnameLookups off
156
157 @@ -37,16 +37,16 @@
158 LoadModule autoindex_module modules/mod_autoindex.so
159 LoadModule dir_module modules/mod_dir.so
160 LoadModule asis_module modules/mod_asis.so
161 -LoadModule imap_module modules/mod_imap.so
162 +#LoadModule imap_module modules/mod_imap.so
163 LoadModule actions_module modules/mod_actions.so
164 LoadModule userdir_module modules/mod_userdir.so
165 LoadModule proxy_module modules/mod_proxy.so
166 LoadModule proxy_http_module modules/mod_proxy_http.so
167 LoadModule alias_module modules/mod_alias.so
168 LoadModule rewrite_module modules/mod_rewrite.so
169 -LoadModule access_module modules/mod_access.so
170 -LoadModule auth_module modules/mod_auth.so
171 -LoadModule auth_anon_module modules/mod_auth_anon.so
172 +#LoadModule access_module modules/mod_access.so
173 +#LoadModule auth_module modules/mod_auth.so
174 +#LoadModule auth_anon_module modules/mod_auth_anon.so
175 LoadModule auth_digest_module modules/mod_auth_digest.so
176 LoadModule expires_module modules/mod_expires.so
177 LoadModule headers_module modules/mod_headers.so
178 diff -urN smeserver-phpki-ng-0.3.old/root/usr/lib/systemd/system/httpd-pki.service smeserver-phpki-ng-0.3/root/usr/lib/systemd/system/httpd-pki.service
179 --- smeserver-phpki-ng-0.3.old/root/usr/lib/systemd/system/httpd-pki.service 1970-01-01 01:00:00.000000000 +0100
180 +++ smeserver-phpki-ng-0.3/root/usr/lib/systemd/system/httpd-pki.service 2021-02-09 13:02:20.993846308 +0000
181 @@ -0,0 +1,9 @@
182 +[Unit]
183 +Description=Certificate management
184 +After=network.service
185 +[Service]
186 +Type=forking
187 +ExecStart=/usr/sbin/systemd/httpd-pki
188 +[Install]
189 +WantedBy=sme-server.target
190 +
191 diff -urN smeserver-phpki-ng-0.3.old/root/usr/sbin/systemd/httpd-pki smeserver-phpki-ng-0.3/root/usr/sbin/systemd/httpd-pki
192 --- smeserver-phpki-ng-0.3.old/root/usr/sbin/systemd/httpd-pki 1970-01-01 01:00:00.000000000 +0100
193 +++ smeserver-phpki-ng-0.3/root/usr/sbin/systemd/httpd-pki 2021-02-11 10:35:37.924049469 +0000
194 @@ -0,0 +1,12 @@
195 +#!/bin/sh
196 +#----------------------------------------------------------------------
197 +# copyright (C) 1999-2004 Mitel Networks Corporation
198 +#----------------------------------------------------------------------
199 +
200 +config=/etc/httpd/pki-conf/httpd.conf
201 +
202 +[ -e $config ] || exit 1
203 +
204 +exec 2>&1
205 +exec chpst -P /usr/sbin/httpd -f $config -D FOREGROUND &
206 +

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