mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
Update v-activate-rocket-nginx
This commit is contained in:
parent
33d0e6df9c
commit
a531eb20f6
1 changed files with 9 additions and 7 deletions
|
@ -83,23 +83,25 @@ fi
|
||||||
echo "Proxy Template is ready"
|
echo "Proxy Template is ready"
|
||||||
|
|
||||||
# Disabling wp-cron in wp-config.php
|
# Disabling wp-cron in wp-config.php
|
||||||
|
checkstring_disable="define('DISABLE_WP_CRON', true)"
|
||||||
|
checkstring_enable="define('DISABLE_WP_CRON', false)"
|
||||||
string_disable="define( 'DISABLE_WP_CRON', true );"
|
string_disable="define( 'DISABLE_WP_CRON', true );"
|
||||||
string_enable="define( 'DISABLE_WP_CRON', false );"
|
|
||||||
line="<?php"
|
line="<?php"
|
||||||
file="/home/$user/web/$domain/public_html/wp-config.php"
|
file="wp-config.php"
|
||||||
|
|
||||||
if grep -q "$string_disable" "$file"; then
|
if grep -q -w -i -F "$checkstring_disable" "$file"; then
|
||||||
echo "WP-Cron is already disabled in your wp-config.php"
|
echo "WP-Cron is already disabled in your wp-config.php"
|
||||||
elif grep -q "$string_enable" "$file"; then
|
elif grep -q -w -i -F "$checkstring_enable" "$file"; then
|
||||||
echo "Disabling WP-Cron in your wp-config.php..."
|
echo "Disabling WP-Cron in your wp-config.php..."
|
||||||
sed -i "/$string_enable/d" $file
|
sed -i "/$checkstring_enable/d" "$file"
|
||||||
sed -i "/$line/a $string_disable" $file
|
sed -i "/$line/Ia $string_disable" "$file"
|
||||||
else
|
else
|
||||||
echo "Disabling WP-Cron in your wp-config.php..."
|
echo "Disabling WP-Cron in your wp-config.php..."
|
||||||
sed -i "/$line/a $string_disable" $file
|
sed -i "/$line/Ia $string_disable" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Adding cron job
|
# Adding cron job
|
||||||
echo "Adding cron job..."
|
echo "Adding cron job..."
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue