diff --git a/scripts/_common.sh b/scripts/_common.sh index 3762309..8000f3b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,6 +1,5 @@ ### Constants -nginx_conf_path="/etc/nginx/conf.d/${domain}.d/ihatemoney.conf" supervisor_conf_path="/etc/supervisor/conf.d/ihatemoney.conf" gunicorn_conf_path="/etc/ihatemoney/gunicorn.conf.py" ihatemoney_conf_path="/etc/ihatemoney/ihatemoney.cfg" diff --git a/scripts/backup b/scripts/backup index 6387aec..7c21e82 100644 --- a/scripts/backup +++ b/scripts/backup @@ -22,10 +22,10 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd) # Backup conf files mkdir ./conf -ynh_backup "$nginx_conf_path" "conf/nginx.conf" -ynh_backup "$gunicorn_conf_path" "conf/gunicorn.conf.py" -ynh_backup "$supervisor_conf_path" "conf/supervisor.conf" -ynh_backup "$ihatemoney_conf_path" "conf/ihatemoney.cfg" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "$gunicorn_conf_path" +ynh_backup "$supervisor_conf_path" +ynh_backup "$ihatemoney_conf_path" # Dump the database mysqldump -u "$dbuser" -p"$dbpass" --no-create-db "$dbname" > ./db.sql diff --git a/scripts/restore b/scripts/restore index 7bf2e3e..a2870ac 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,10 +23,6 @@ test -d $INSTALL_DIR && ynh_die \ "The destination directory '$INSTALL_DIR' already exists.\ You should safely delete it before restoring this app." -test -f $nginx_conf_path && ynh_die \ -"The NGINX configuration already exists at '${nginx_conf_path}'. - You should safely delete it before restoring this app." - test -f $supervisor_conf_path && ynh_die \ "The Supervisor configuration already exists at '${supervisor_conf_path}'. You should safely delete it before restoring this app."