From 7a1cd8a6f6eef9d7a5987830da6485e71fc804ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:46:46 +0000 Subject: [PATCH] fix(wordpress): use /run/wrappers/bin/su to fix su: command not found in wordpress-init service Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/24a9d2b1-6b09-41ac-bb3b-418f0ea2b2d7 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- modules/wordpress.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/wordpress.nix b/modules/wordpress.nix index c1023c4..9a745f9 100755 --- a/modules/wordpress.nix +++ b/modules/wordpress.nix @@ -60,7 +60,7 @@ lib.mkIf config.sovran_systemsOS.services.wordpress { RemainAfterExit = true; }; - path = with pkgs; [ curl unzip wp-cli pwgen php coreutils ]; + path = with pkgs; [ curl unzip wp-cli pwgen php coreutils shadow util-linux ]; script = '' set -euo pipefail @@ -97,7 +97,7 @@ lib.mkIf config.sovran_systemsOS.services.wordpress { echo "Generating wp-config.php..." cd "$INSTALL_DIR" - su -s /bin/sh caddy -c " + /run/wrappers/bin/su -s /bin/sh caddy -c " wp config create \ --dbname='$DB_NAME' \ --dbuser='$DB_USER' \ @@ -108,14 +108,14 @@ lib.mkIf config.sovran_systemsOS.services.wordpress { echo "Waiting for database..." for i in $(seq 1 30); do - if su -s /bin/sh caddy -c "wp db check" 2>/dev/null; then + if /run/wrappers/bin/su -s /bin/sh caddy -c "wp db check" 2>/dev/null; then break fi sleep 2 done echo "Running WordPress core install..." - su -s /bin/sh caddy -c " + /run/wrappers/bin/su -s /bin/sh caddy -c " wp core install \ --url='https://$DOMAIN' \ --title='Sovran_SystemsOS' \ @@ -125,7 +125,7 @@ lib.mkIf config.sovran_systemsOS.services.wordpress { --skip-email " - su -s /bin/sh caddy -c " + /run/wrappers/bin/su -s /bin/sh caddy -c " wp option update blogdescription 'Powered by Sovran_SystemsOS' wp option update permalink_structure '/%postname%/' wp option update default_ping_status 'closed' @@ -133,7 +133,7 @@ lib.mkIf config.sovran_systemsOS.services.wordpress { wp rewrite flush " - su -s /bin/sh caddy -c " + /run/wrappers/bin/su -s /bin/sh caddy -c " wp config set DISALLOW_FILE_EDIT true --raw wp config set WP_AUTO_UPDATE_CORE true --raw wp config set FORCE_SSL_ADMIN true --raw