mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -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"
|
||||
|
||||
# Disabling wp-cron in wp-config.php
|
||||
echo "Disabling WP-Cron in your wp-config.php..."
|
||||
string="define( 'DISABLE_WP_CRON', true );"
|
||||
line="define( 'DB_COLLATE', '' );"
|
||||
string_disable="define( 'DISABLE_WP_CRON', true );"
|
||||
string_enable="define( 'DISABLE_WP_CRON', false );"
|
||||
line="<?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
|
||||
echo "Adding cron job..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue