From 602adaaf945013d802e2c421a538b0e006ba2a25 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 19 Oct 2024 13:08:48 -0700 Subject: [PATCH] wp: synced with master --- tnpi/wordpress_simerson.sh | 164 +++++++++++++------------------------ 1 file changed, 56 insertions(+), 108 deletions(-) diff --git a/tnpi/wordpress_simerson.sh b/tnpi/wordpress_simerson.sh index 6c220784..ed4cfdc4 100755 --- a/tnpi/wordpress_simerson.sh +++ b/tnpi/wordpress_simerson.sh @@ -1,10 +1,12 @@ #!/bin/sh -# shellcheck disable=1091 -. mail-toaster.sh || exit +set -e + +. mail-toaster.sh export JAIL_START_EXTRA="" export JAIL_CONF_EXTRA="" +export JAIL_FSTAB="" mt6-include php mt6-include nginx @@ -14,105 +16,52 @@ install_wordpress() assure_jail mysql install_nginx - install_php 74 "ctype curl ftp gd hash json mysqli session tokenizer xml zip zlib" + install_php 82 "ctype curl exif fileinfo ftp gd mysqli pecl-imagick session tokenizer xml zip zlib" # stage_pkg_install wordpress - stage_port_install www/wordpress || exit -} - -configure_nginx_standalone() -{ - if [ -f "$STAGE_MNT/data/etc/nginx-locations.conf" ]; then - tell_status "preserving /data/etc/nginx-locations.conf" - return - fi - - tee "$STAGE_MNT/data/etc/nginx-locations.conf" <<'EO_WP_NGINX' - - server_name wordpress; - index index.php; - root /usr/local/www; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location / { - # include "?$args" so non-default permalinks don't break - try_files $uri $uri/ /index.php?$args; - } - - location ~ \.php$ { - include /usr/local/etc/nginx/fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors on; - fastcgi_pass php; - } - - location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ { - expires max; - log_not_found off; - } - -EO_WP_NGINX - + stage_port_install www/wordpress } -configure_nginx_with_path() +configure_nginx_server() { - if [ -f "$STAGE_MNT/data/etc/nginx-locations.conf" ]; then - tell_status "preserving /data/etc/nginx-locations.conf" - return - fi - - local _uri_path="$1" - if [ -z "$_uri_path" ]; then - tell_status "using /wpn (wordpress network) for WP url path" - _uri_path="/wpn" - fi - - tee "$STAGE_MNT/data/etc/nginx-locations.conf" <<'EO_WP_NGINX' - - server_name wordpress; - index index.php; - root /usr/local/www/wordpress; - - # all PHP scripts, optionally within /wpn/ - location ~ ^/(?:wpn/)?(?