1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00
bozon_ynh/scripts/backup
ewilly 16ef7053e6 Solving App is broken #17 3
* Correct restore script `ynh_package_install_from_equivs`
* Change in each script `#! /bin/bash` with `#!/bin/bash`
* Correct `pathluaregex` in case of a installation on root
2017-01-08 12:17:57 +01:00

25 lines
619 B
Bash

#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# retrieve arguments
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get "$app" domain)
# definie useful vars
parent_path=/var/www
final_path="$parent_path"/"$app"
data_path=/home/yunohost.app/"$app"
# backup sources & data
ynh_backup "$final_path" "www"
ynh_backup "$data_path" "data"
# backup Nginx and php-fpm
mkdir ./conf
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"
ynh_backup "/etc/php5/fpm/pool.d/${app}.conf" "conf/php-fpm.conf"