1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/matomo_ynh.git synced 2024-09-03 19:45:56 +02:00

cron job backup and restore

This commit is contained in:
anmol 2018-10-31 20:13:26 +05:30
parent 7fbd8cb92b
commit 85a408bea5
2 changed files with 12 additions and 7 deletions

View file

@ -55,3 +55,9 @@ ynh_backup "/etc/php5/fpm/pool.d/$app.conf"
#================================================= #=================================================
ynh_mysql_dump_db "$db_name" > db.sql ynh_mysql_dump_db "$db_name" > db.sql
#=================================================
# BACKUP A CRON FILE
#=================================================
ynh_backup "/etc/cron.d/$app"

View file

@ -76,13 +76,6 @@ ynh_system_user_create $app
# Restore permissions on app files # Restore permissions on app files
chown -R $app: $final_path 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 # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -98,6 +91,12 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
# Define and install dependencies # 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 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 # GENERIC FINALIZATION
#================================================= #=================================================