mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
Update v-activate-rocket-nginx
This commit is contained in:
parent
94770a5f12
commit
33d0e6df9c
1 changed files with 15 additions and 4 deletions
|
@ -83,11 +83,22 @@ 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
|
||||||
echo "Disabling WP-Cron in your wp-config.php..."
|
string_disable="define( 'DISABLE_WP_CRON', true );"
|
||||||
string="define( 'DISABLE_WP_CRON', true );"
|
string_enable="define( 'DISABLE_WP_CRON', false );"
|
||||||
line="define( 'DB_COLLATE', '' );"
|
line="<?php"
|
||||||
file="/home/$user/web/$domain/public_html/wp-config.php"
|
file="/home/$user/web/$domain/public_html/wp-config.php"
|
||||||
sed -i "/$line/a $string" $file
|
|
||||||
|
if grep -q "$string_disable" "$file"; then
|
||||||
|
echo "WP-Cron is already disabled in your wp-config.php"
|
||||||
|
elif grep -q "$string_enable" "$file"; then
|
||||||
|
echo "Disabling WP-Cron in your wp-config.php..."
|
||||||
|
sed -i "/$string_enable/d" $file
|
||||||
|
sed -i "/$line/a $string_disable" $file
|
||||||
|
else
|
||||||
|
echo "Disabling WP-Cron in your wp-config.php..."
|
||||||
|
sed -i "/$line/a $string_disable" $file
|
||||||
|
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