1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zeronet_ynh.git synced 2024-09-03 17:46:12 +02:00
zeronet_ynh/scripts/backup

25 lines
766 B
Text
Raw Normal View History

2017-03-03 21:26:30 +01:00
#!/usr/bin/env bash
source /usr/share/yunohost/helpers
main() {
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