mirror of
https://github.com/YunoHost-Apps/zeronet_ynh.git
synced 2024-09-03 17:46:12 +02:00
24 lines
766 B
Bash
Executable file
24 lines
766 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
main() {
|
|
ynh_abort_if_errors
|
|
|
|
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"
|
|
|
|
mkdir --parent ./conf
|
|
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
|