1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00
This commit is contained in:
ericgaspar 2021-04-18 19:31:40 +02:00
parent 40be01f0f0
commit 9fc4d0dcd3
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 11 additions and 18 deletions

View file

@ -61,6 +61,14 @@ db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -88,14 +96,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config "public_path"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -110,9 +110,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Installing Lychee with Composer..." --weight=15
# Install composer
#ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev"
ynh_install_composer --install_args="--ignore-platform-reqs"
#=================================================
@ -134,13 +131,6 @@ popd
# Setup custom user.css file
cp ../conf/user.css.example $final_path/public/dist/user.css
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/.env"
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================

View file

@ -95,6 +95,9 @@ then
# Backup the config file in the temp dir
cp -a "$final_path/public/dist/user.css" "$tmpdir/user.css"
# Move media to new path
cp -a "$final_path/public/uploads/*" "$public_path/uploads/"
# Remove the app directory securely
ynh_secure_remove --file="$final_path"