From d0785e798d92e5d9ba27b0523aa29d6fbcd5b68e Mon Sep 17 00:00:00 2001 From: bencharp Date: Sun, 2 Jan 2022 02:37:17 +0100 Subject: [PATCH] fix restore typo --- scripts/backup | 1 + scripts/install | 5 +---- scripts/restore | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/backup b/scripts/backup index 11f4062..ca43193 100755 --- a/scripts/backup +++ b/scripts/backup @@ -49,6 +49,7 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="$datadir" +#================================================= # BACKUP THE ARMADIETTO SERVER #================================================= diff --git a/scripts/install b/scripts/install index 890b2ad..c3ea003 100755 --- a/scripts/install +++ b/scripts/install @@ -40,6 +40,7 @@ datadir="/home/yunohost.app/${app}/storage" ynh_script_progression --message="Validating installation parameters..." --weight=2 final_path=/opt/yunohost/$app + test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Only on / directory @@ -86,8 +87,6 @@ ynh_use_nodejs ynh_script_progression --message="Setting up and create final app path..." --weight=1 ynh_app_setting_set $app final_path $final_path -# Download, check integrity, uncompress and patch the source from app.src -# ynh_setup_source --dest_dir="$final_path" # Create final_path mkdir -p "$final_path" @@ -97,8 +96,6 @@ mkdir -p "$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -### `ynh_add_nginx_config` will use the file conf/nginx.conf - # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/restore b/scripts/restore index d9bcc3d..d825274 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,7 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d "$final_path" || ynh_die --message="There is already a directory: $final_path " #================================================= # REINSTALL DEPENDENCIES @@ -61,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." ---weight=1 +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) ynh_system_user_create --username=$app