fix rediness probe

This commit is contained in:
Jay Sharma
2023-09-19 07:34:05 +05:30
parent cc6bcef722
commit 12ca6b258f

View File

@@ -1,10 +1,14 @@
#!/bin/bash #!/bin/bash
# -----------------------------------------------------------------------------------------------------
export WP_FILE="/usr/share/nginx/subdomain/www/wp-config.php" 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_SITEURL\'', '\'http://localhost/\'');' $WP_FILE || exit 9
sed -i '/^define.*NONCE_SALT.*/a define(\'\'WP_HOME\'', '\'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
# ---------------------------------------------------