diff --git a/scripts/backup b/scripts/backup index 10f2b20..5cceb39 100755 --- a/scripts/backup +++ b/scripts/backup @@ -55,3 +55,9 @@ ynh_backup "/etc/php5/fpm/pool.d/$app.conf" #================================================= ynh_mysql_dump_db "$db_name" > db.sql + +#================================================= +# BACKUP A CRON FILE +#================================================= + +ynh_backup "/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 8388eca..c773425 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,13 +76,6 @@ ynh_system_user_create $app # Restore permissions on app files chown -R $app: $final_path -# Set up cron -ynh_replace_string "YNH_WWW_PATH" "$final_path" ../conf/cron -ynh_replace_string "__USER__" "$app" ../conf/cron -ynh_replace_string "__DOMAIN__" "$domain" ../conf/cron -ynh_replace_string "__PATH__" "$path_url" ../conf/cron -sudo cp -f ../conf/cron /etc/cron.d/$app - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -98,6 +91,12 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" # Define and install dependencies ynh_install_app_dependencies php7.0-curl php7.0-gd php7.0-cli php7.0-mysql php-xml php7.0-mbstring +#================================================= +# RESTORE THE CRON FILE +#================================================= + +ynh_restore_file "/etc/cron.d/$app" + #================================================= # GENERIC FINALIZATION #=================================================