mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
20 lines
501 B
Bash
20 lines
501 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"
|