From d64fcb988456a46bed28dc4159c7420d6bea5805 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 4 Apr 2021 17:17:59 +0200 Subject: [PATCH] Update install --- scripts/install | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 11be1bc..6b9fda2 100755 --- a/scripts/install +++ b/scripts/install @@ -33,8 +33,8 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -public_path=/home/yunohost.app/$app -test ! -e "${public_path}" || ynh_die --message="${public_path} already exists" +# public_path=/home/yunohost.app/$app +# test ! -e "${public_path}" || ynh_die --message="${public_path} already exists" # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -77,9 +77,16 @@ ynh_setup_source --dest_dir=$final_path # CREATE DIRECTORIES #================================================= +public_path=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=public_path --value=$public_path -mkdir -p ${public_path}/uploads -mkdir -p ${public_path}/uploads/{big,import,medium,raw,small,thumb} + +mkdir -p $public_path/uploads +mkdir -p $public_path/uploads/{big,import,medium,raw,small,thumb} + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config "public_path" @@ -142,7 +149,7 @@ ynh_store_file_checksum "$final_path/.env" # Set permissions to app files chown -R $app: $final_path chown -R $app: $public_path -chmod -R 755 ${public_path} +chmod -R 755 $public_path #================================================= # SETUP SSOWAT