1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/20euros_ynh.git synced 2024-09-03 18:05:53 +02:00
20euros_ynh/scripts/backup

44 lines
1.3 KiB
Text
Raw Normal View History

2020-05-10 11:02:01 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
2020-05-29 18:47:56 +02:00
ynh_print_info --message="Backing up 20euros..."
2020-05-10 11:02:01 +02:00
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# END OF SCRIPT
#=================================================
2020-05-29 18:47:56 +02:00
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."