1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00

Merge pull request #118 from YunoHost-Apps/fix-cron

Fix cron
This commit is contained in:
Kayou 2021-01-05 14:57:48 +01:00 committed by GitHub
commit 78d7b0c3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 13 deletions

View file

@ -18,6 +18,9 @@
* @package WordPress
*/
/** Disable the wordress cron because it's managed by the system */
define('DISABLE_WP_CRON', true);
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '__DB_USER__');

View file

@ -66,8 +66,8 @@ yunohost app action run $app reset_default_phpfpm
# CREATE A CRON TASK FOR AUTOMATIC UPDATE
#=================================================
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
0 3 * * * root wget -q -O - https://$domain$path_url/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
echo "# Reach everyday wp-cron.php to trig the internal WordPress cron.
0 3 * * * $app php$phpversion $final_path/wp-cron.php" > /etc/cron.d/$app
#=================================================
# SECURE FILES AND DIRECTORIES

View file

@ -123,13 +123,6 @@ db_prefix=$(grep '^$table_prefix' "$final_path/wp-config.php" | sed "s/.*'\(.*\)
ynh_mysql_execute_as_root --sql="UPDATE ${db_prefix}options SET option_value='https://$new_domain$new_path' WHERE option_name='siteurl'" --database=$app
ynh_mysql_execute_as_root --sql="UPDATE ${db_prefix}options SET option_value='https://$new_domain$new_path' WHERE option_name='home'" --database=$app
#=================================================
# UPDATE THE CRON
#=================================================
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
0 3 * * * root wget -q -O - https://$new_domain$new_path/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
#=================================================
# GENERIC FINALISATION
#=================================================

View file

@ -228,8 +228,8 @@ ynh_store_file_checksum --file="$final_path/wp-config.php"
# CREATE A CRON TASK FOR AUTOMATIC UPDATE
#=================================================
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal WordPress cron.
0 3 * * * root wget -q -O - https://$domain$path_url/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
echo "# Reach everyday wp-cron.php to trig the internal WordPress cron.
0 3 * * * $app php$phpversion $final_path/wp-cron.php" > /etc/cron.d/$app
#=================================================
# GENERIC FINALISATION

View file

@ -263,8 +263,8 @@ ynh_store_file_checksum --file="$final_path/wp-config.php"
# CREATE A CRON TASK FOR AUTOMATIC UPDATE
#=================================================
echo "# Reach everyday wp-cron.php?doing_wp_cron to trig the internal wordpress cron.
0 3 * * * root wget -q -O - https://$domain$path_url/wp-cron.php?doing_wp_cron >/dev/null 2>&1" > /etc/cron.d/$app
echo "# Reach everyday wp-cron.php to trig the internal WordPress cron.
0 3 * * * $app php$phpversion $final_path/wp-cron.php" > /etc/cron.d/$app
#=================================================
# GENERIC FINALISATION