1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/strut_ynh.git synced 2024-09-03 20:26:33 +02:00
strut_ynh/scripts/backup

21 lines
530 B
Bash

#!/bin/bash
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e
# Source YNH helpers
. /usr/share/yunohost/helpers
# Get app instance name
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments
domain=$(sudo yunohost app setting $app domain)
path=$(sudo yunohost app setting $app path)
public_site=$(sudo yunohost app setting $app public_site)
# Copy the app files
ynh_backup "/var/www/$app" "sources"
# Copy the conf files
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "conf/nginx.conf"