backup 501 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Exit on command errors and treat unset variables as an error
  3. set -eu
  4. # See comments in install script
  5. app=$YNH_APP_INSTANCE_NAME
  6. # Source YunoHost helpers
  7. . /usr/share/yunohost/helpers
  8. # Backup sources & data
  9. ynh_backup "/opt/$app" "sources"
  10. # Copy NGINX configuration
  11. domain=$(ynh_app_setting_get "$app" domain)
  12. ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
  13. # Copy Gunicorn pool configuration
  14. ynh_backup "/etc/systemd/system/$app.service" "gunicorn.service"