From cac99a41da43c4a829212f7a0c9ddd4ede9b1394 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Thu, 9 Mar 2017 16:24:48 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9placer=20les=20fichier=20apr=C3=A8s=20un?= =?UTF-8?q?=20exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/restore | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index bf2dfc3..c8a18dc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,10 +19,6 @@ is_public=$(ynh_app_setting_get $app is_public) sudo yunohost app checkurl "${domain}${path}" -a "$app" \ || ynh_die "Path not available: ${domain}${path}" -# Restore sources & data -final_path="/var/www/${app}" -sudo cp -a ./sources "$final_path" - # Check configuration files php-fpm nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf" [[ -f $nginx_conf ]] && ynh_die \ @@ -37,6 +33,10 @@ phpfpm_ini="/etc/php5/fpm/conf.d/20-${app}.ini" "The PHP FPM INI configuration already exists at '${phpfpm_ini}'. You should safely delete it before restoring this app." +# Restore sources & data +final_path="/var/www/${app}" +sudo cp -a ./sources "$final_path" + # Set permissions sudo chown -R www-data: $final_path