1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/linkstack_ynh.git synced 2024-09-03 19:36:14 +02:00
This commit is contained in:
Tagadda 2023-05-06 20:35:37 +00:00
parent 200b0aa113
commit abb7a2a2a4
2 changed files with 11 additions and 2 deletions

View file

@ -70,6 +70,9 @@ popd
# End of installation # End of installation
ynh_secure_remove $install_dir/INSTALLING ynh_secure_remove $install_dir/INSTALLING
ynh_write_var_in_file --file="$install_dir/.env" --key="APP_DEBUG" --value="false"
ynh_write_var_in_file --file="$install_dir/.env" --key="APP_ENV" --value="production"
ynh_write_var_in_file --file="$install_dir/.env" --key="NOTIFY_UPDATES" --value="true"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -28,11 +28,17 @@ upgrade_type=$(ynh_check_app_version_changed)
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
# Enable maintenance mode while upgrading
ynh_write_var_in_file --file="$install_dir/.env" --key="MAINTENANCE_MODE" --value="true"
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
# Keep .env and database.sqlite ! # Keep .env and database.sqlite !
ynh_setup_source --dest_dir="$install_dir" --keep=".env database/database.sqlite" ynh_setup_source --dest_dir="$install_dir" --keep=".env database/database.sqlite"
# Remove this file as the app is already installed
ynh_secure_remove $install_dir/INSTALLING
fi fi
# $install_dir will automatically be initialized with some decent # $install_dir will automatically be initialized with some decent
@ -40,8 +46,8 @@ fi
# ownership to all files such as after the ynh_setup_source step # ownership to all files such as after the ynh_setup_source step
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
# Remove this file as the app is already installed # Disable maintenance mode
ynh_secure_remove $install_dir/INSTALLING ynh_write_var_in_file --file="$install_dir/.env" --key="MAINTENANCE_MODE" --value="false"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS