From 12ca6b258fa7f1de0ff7daa359c91cc24dad0c9c Mon Sep 17 00:00:00 2001 From: Jay Sharma Date: Tue, 19 Sep 2023 07:34:05 +0530 Subject: [PATCH] fix rediness probe --- redinessprobe-wp.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/redinessprobe-wp.sh b/redinessprobe-wp.sh index 04f0e143..d21e0304 100644 --- a/redinessprobe-wp.sh +++ b/redinessprobe-wp.sh @@ -1,10 +1,14 @@ #!/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 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 +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 +# ---------------------------------------------------