mirror of
https://github.com/YunoHost-Apps/pelican_ynh.git
synced 2024-09-03 19:46:35 +02:00
20 lines
488 B
Bash
20 lines
488 B
Bash
#!/bin/bash
|
|
|
|
# Exit on command errors and treat access to unset variables as an error
|
|
set -eu
|
|
|
|
# Source YNH helpers
|
|
. /usr/share/yunohost/helpers
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Retrieve arguments
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
path=$(ynh_app_setting_get "$app" path)
|
|
is_public=$(ynh_app_setting_get "$app" is_public)
|
|
|
|
# Copy the app source files
|
|
ynh_backup "/var/www/$app" "www"
|
|
|
|
# Copy the conf files
|
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"
|