From cc6bcef72267e960f0dcd403a41699d40528b681 Mon Sep 17 00:00:00 2001 From: Jay Sharma Date: Tue, 19 Sep 2023 07:25:31 +0530 Subject: [PATCH] fix rediness probe --- redinessprobe-wp.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/redinessprobe-wp.sh b/redinessprobe-wp.sh index 7a946f84..04f0e143 100644 --- a/redinessprobe-wp.sh +++ b/redinessprobe-wp.sh @@ -1,8 +1,10 @@ #!/bin/bash export WP_FILE="/usr/share/nginx/subdomain/www/wp-config.php" -sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_SITEURL\'', '\'http://localhost/\'');' $WP_FILE || exit -sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_HOME\'', '\'http://localhost/\'');' $WP_FILE || exit -wget --spider localhost && wget --spider localhost/wp-login.php || exit -sed -i '/http\:\/\/localhost/d' $WP_FILE || exit +sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_SITEURL\'', '\'http://localhost/\'');' $WP_FILE || exit 9 +sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_HOME\'', '\'http://localhost/\'');' $WP_FILE || exit 9 +wget -q --spider localhost && echo pass-localhost || exit 9 +sleep 1 +wget -q --spider localhost/wp-login.php && echo pass-wp-login.php|| exit 9 +sed -i '/http\:\/\/localhost/d' $WP_FILE || exit 9