1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/privatebin_ynh.git synced 2024-09-03 20:15:56 +02:00
privatebin_ynh/scripts/backup

48 lines
1.3 KiB
Text
Raw Normal View History

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
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"
ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini"