mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
23 lines
566 B
Bash
23 lines
566 B
Bash
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
# See comments in install script
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Source YunoHost helpers
|
|
. /usr/share/yunohost/helpers
|
|
|
|
# Backup sources & data
|
|
ynh_backup "/opt/$app" "sources"
|
|
|
|
# Copy NGINX configuration
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|
|
|
|
# Copy Gunicorn pool configuration
|
|
ynh_backup "/etc/systemd/system/$app.service" "gunicorn.service"
|
|
|
|
# Backup database
|
|
ynh_psql_dump_db "$app" > ${YNH_CWD}/dump.sql
|