2016-05-07 02:14:57 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-05-07 02:14:57 +02:00
|
|
|
|
2017-04-16 17:22:30 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-05-07 02:14:57 +02:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# MANAGE SCRIPT FAILURE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
|
|
ynh_abort_if_errors
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
2016-05-07 02:14:57 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
final_path=$(ynh_app_setting_get $app final_path)
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD BACKUP STEPS
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_backup "$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2016-05-07 02:14:57 +02:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
2016-05-07 02:14:57 +02:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# BACKUP THE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2016-05-07 02:14:57 +02:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
ynh_backup "/etc/php5/fpm/pool.d/$app.conf"
|