mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Update install
This commit is contained in:
parent
fcedd07a08
commit
ed78a80446
1 changed files with 9 additions and 6 deletions
|
@ -33,9 +33,6 @@ 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"
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
||||
|
@ -78,9 +75,15 @@ ynh_setup_source --dest_dir=$final_path
|
|||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
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}
|
||||
# If public_path doesn't exist, create it
|
||||
if [ -z "/home/yunohost.app/$app" ]; then
|
||||
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}
|
||||
else
|
||||
ynh_die --message="This path already contains a folder"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config "public_path"
|
||||
|
|
Loading…
Add table
Reference in a new issue