/[smecontribs]/rpms/smeserver-wordpress/contribs10/smeserver-wordpress-1.2-Add-backup-folders-to-createlinks.patch
ViewVC logotype

Contents of /rpms/smeserver-wordpress/contribs10/smeserver-wordpress-1.2-Add-backup-folders-to-createlinks.patch

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


Revision 1.1 - (show annotations) (download)
Mon Aug 1 14:55:28 2022 UTC (2 years, 3 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-wordpress-1_2-12_el7_sme, HEAD
* Sun Jul 31 2022 Brian Read <brianr@bjsystems.co.uk> 1.2-12.sme
- Add in backup folders to createlinks [SME: 12070]
- update to httpd 2.4 access syntax [SME: 12050]

1 diff -urN smeserver-wordpress-1.2.old/createlinks smeserver-wordpress-1.2/createlinks
2 --- smeserver-wordpress-1.2.old/createlinks 2022-07-31 11:25:04.708240161 +0100
3 +++ smeserver-wordpress-1.2/createlinks 2022-07-31 12:10:03.194996634 +0100
4 @@ -77,3 +77,8 @@
5 {
6 safe_symlink("../actions/wordpress", "root/etc/e-smith/events/$event/20wordpress");
7 }
8 +
9 +use esmith::Build::Backup qw(:all);
10 +backup_includes("smeserver-wordpress", qw(
11 +/usr/share/wordpress/wp-content
12 +));
13 diff -urN smeserver-wordpress-1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress smeserver-wordpress-1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress
14 --- smeserver-wordpress-1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress 2022-07-31 11:25:04.709240165 +0100
15 +++ smeserver-wordpress-1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress 2022-08-01 15:40:50.254150336 +0100
16 @@ -4,7 +4,7 @@
17 unless $status eq 'enabled';
18
19 $OUT = "";
20 - my $allow = 'all';
21 + my $allow = 'all granted';
22 my $pass = '0';
23 my $satisfy = 'all';
24 my $name = $wordpress{'Name'} || 'Wordpress weblog';
25 @@ -19,31 +19,31 @@
26 }
27 elsif ($wordpress{'PublicAccess'} eq 'local')
28 {
29 - $allow = $localAccess;
30 + $allow = "ip $localAccess";
31 $pass = 0;
32 $satisfy = 'all';
33 }
34 elsif ($wordpress{'PublicAccess'} eq 'local-pw')
35 {
36 - $allow = $localAccess;
37 + $allow = "ip $localAccess";
38 $pass = 1;
39 $satisfy = 'all';
40 }
41 elsif ($wordpress{'PublicAccess'} eq 'global')
42 {
43 - $allow = 'all';
44 + $allow = 'all granted';
45 $pass = 0;
46 $satisfy = 'all';
47 }
48 elsif ($wordpress{'PublicAccess'} eq 'global-pw')
49 {
50 - $allow = 'all';
51 + $allow = 'all granted';
52 $pass = 1;
53 $satisfy = 'all';
54 }
55 elsif ($wordpress{'PublicAccess'} eq 'global-pw-remote')
56 {
57 - $allow = $localAccess;
58 + $allow = "ip $localAccess";
59 $pass = 1;
60 $satisfy = 'any';
61 }
62 @@ -66,24 +66,27 @@
63 $OUT .= "<Directory /usr/share/wordpress>\n";
64
65 $version = "73";
66 - $OUT .= "<FilesMatch \.php\$\>\n";
67 - $OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
68 - $OUT .= "</FilesMatch>\n";
69 + $OUT .= " <FilesMatch \.php\$\>\n";
70 + $OUT .= " SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
71 + $OUT .= " </FilesMatch>\n";
72
73 $OUT .= " AddType application/x-httpd-php .php\n";
74 - $OUT .= " #php_admin_value open_basedir /usr/share/wordpress:/etc/wordpress:/tmp/:/usr/share/pear:/usr/share/php/\n";
75 + #$OUT .= " php_admin_value open_basedir /usr/share/wordpress:/etc/wordpress:/tmp/:/usr/share/pear:/usr/share/php/\n";
76 $OUT .= " Options ";
77 $OUT .= " FollowSymLinks " if ( ($wordpress{'SymLinks'} || 'disabled') eq 'enabled');
78 $OUT .= " Indexes " if ( ($wordpress{'Indexes'} || 'disabled') eq 'enabled');
79 $OUT .= " None " if ((($wordpress{'Indexes'} || 'disabled') ne 'enabled') && (($wordpress{'SymLinks'} || 'disabled') ne 'enabled'));
80 $OUT .= "\n AllowOverride All" if ( ($wordpress{'AllowOverrideAll'} || 'disabled') eq 'enabled');
81 - $OUT .= "\n order deny,allow\n";
82 - $OUT .= " deny from all\n";
83 - $OUT .= " allow from $allow\n";
84 - $OUT .= " #php_value mysql.default_host $wordpress{DbName}\n";
85 - $OUT .= " #php_value mysql.default_user $wordpress{DbUser}\n";
86 - $OUT .= " #php_value mysql.default_password $wordpress{DbPassword}\n";
87 - $OUT .= " #php_admin_value upload_tmp_dir /tmp\n";
88 +
89 + #$OUT .= "\n order deny,allow\n";
90 + #$OUT .= " deny from all\n";
91 + #$OUT .= " allow from $allow\n";
92 + $OUT .= "\n Require $allow \n";
93 +
94 + #$OUT .= " php_value mysql.default_host $wordpress{DbName}\n";
95 + #$OUT .= " php_value mysql.default_user $wordpress{DbUser}\n";
96 + #$OUT .= " php_value mysql.default_password $wordpress{DbPassword}\n";
97 + #$OUT .= " php_admin_value upload_tmp_dir /tmp\n";
98
99 if ($pass)
100 {

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