#!/bin/bash # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers # Exit if an error occurs during the execution of the script ynh_abort_if_errors # Load common variables and helpers source ./experimental_helper.sh source ./_common.sh # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) # Copy the app source files ynh_backup "$DESTDIR" # Copy the data files DATADIR="/home/$app" ynh_backup "$DATADIR" # Copy the conf files ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" ynh_backup "/etc/systemd/system/${app}.service" # Dump the database ynh_mysql_dump_db "$dbname" > ./db.sql