2017-03-03 21:26:30 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
main() {
|
2017-11-15 19:19:00 +01:00
|
|
|
ynh_abort_if_errors
|
|
|
|
|
2017-03-03 21:26:30 +01:00
|
|
|
local app=$YNH_APP_INSTANCE_NAME
|
|
|
|
local backup_dir=$YNH_APP_BACKUP_DIR
|
|
|
|
local deploy_path=$( ynh_app_setting_get $app deploy_path )
|
|
|
|
local nginx_config_file=$( ynh_app_setting_get $app nginx_config_file )
|
|
|
|
local systemd_service_name=$( ynh_app_setting_get $app systemd_service_name )
|
|
|
|
local systemd_service_file=$( ynh_app_setting_get $app systemd_service_file )
|
|
|
|
local user_zeronet_dir=$( ynh_app_setting_get $app user_zeronet_dir )
|
|
|
|
|
|
|
|
ynh_backup $deploy_path "sources"
|
|
|
|
|
2020-10-22 21:15:55 +02:00
|
|
|
mkdir --parent ./conf
|
2017-03-03 21:26:30 +01:00
|
|
|
ynh_backup $nginx_config_file "conf/nginx.conf"
|
|
|
|
ynh_backup $systemd_service_file "conf/${systemd_service_name}"
|
|
|
|
ynh_backup $user_zeronet_dir "conf/.zeronet"
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|