mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Fix
This commit is contained in:
parent
ed78a80446
commit
24baaddb7a
3 changed files with 9 additions and 17 deletions
|
@ -26,14 +26,14 @@ DB_HOST=127.0.0.1
|
|||
DB_PORT=3306
|
||||
DB_DATABASE=__DB_NAME__
|
||||
DB_USERNAME=__DB_NAME__
|
||||
DB_PASSWORD=__DB_PASS__
|
||||
DB_PASSWORD=__DB_PWD__
|
||||
DB_LOG_SQL=false
|
||||
|
||||
TIMEZONE=UTC
|
||||
|
||||
# folders in which the files will be stored
|
||||
LYCHEE_DIST="__FINALPATH__/public/dist/"
|
||||
LYCHEE_UPLOADS="__PUBLICPATH__/uploads/"
|
||||
LYCHEE_DIST="__FINAL_PATH__/public/dist/"
|
||||
LYCHEE_UPLOADS="__PUBLIC_PATH__/uploads/"
|
||||
|
||||
# url to access those files
|
||||
# LYCHEE_DIST_URL="dist/"
|
||||
|
|
|
@ -79,8 +79,8 @@ ynh_setup_source --dest_dir=$final_path
|
|||
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}
|
||||
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
|
||||
|
@ -119,12 +119,8 @@ ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_ar
|
|||
ynh_script_progression --message="Building..."
|
||||
|
||||
# Setup application config
|
||||
cp ../conf/.env.example $final_path/.env
|
||||
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__PUBLICPATH__" --replace_string="$public_path" --target_file="$final_path/.env"
|
||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||
ynh_store_file_checksum "$final_path/.env"
|
||||
|
||||
# Setup application config
|
||||
pushd $final_path
|
||||
|
|
|
@ -155,13 +155,9 @@ ynh_install_composer --phpversion=${phpversion} --workdir=$final_path --install_
|
|||
ynh_script_progression --message="Building..."
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/.env"
|
||||
# Setup application config
|
||||
cp ../conf/.env.example $final_path/.env
|
||||
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="__PUBLICPATH__" --replace_string="$public_path" --target_file="$final_path/.env"
|
||||
# Setup application config
|
||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$final_path/.env"
|
||||
|
|
Loading…
Add table
Reference in a new issue