1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fittrackee_ynh.git synced 2024-09-03 18:36:16 +02:00

some cleaning

This commit is contained in:
Thomas 2024-02-24 10:18:06 +01:00 committed by GitHub
parent ac3bb927de
commit a4906898da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 14 deletions

View file

@ -14,6 +14,13 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider
ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key
# Configure redis
redis_db=$(ynh_redis_get_free_db)
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
# key for the .env __KEY__
key=$(ynh_string_random --length=45 | base64)
ynh_app_setting_set --app=$app --key=key --value=$key
#=================================================
# LOGROTATE
@ -32,19 +39,10 @@ chown -R $app:www-data /var/log/$app/
# CONFIGURE THE INSTALL SCRIPT
#=================================================
# Configure redis
redis_db=$(ynh_redis_get_free_db)
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
# key for the .env __KEY__
key=$(ynh_string_random --length=45 | base64)
ynh_app_setting_set --app=$app --key=key --value=$key
ynh_script_progression --message="Setting up source files..." --weight=64
ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env"
chmod 600 $install_dir/.env
chmod 400 $install_dir/.env
chown -R $app:www-data "$install_dir"

View file

@ -45,7 +45,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore_file --origin_path="$install_dir"
chmod 600 $install_dir/.env
chmod 400 $install_dir/.env
chown -R $app: "$install_dir"

View file

@ -62,7 +62,7 @@ ynh_script_progression --message="Installing service script..." --weight=1
redis_db=$(ynh_redis_get_free_db)
ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env"
chmod 600 $install_dir/.env
chmod 400 $install_dir/.env
chown $app: "$install_dir/.env"
#=================================================
@ -70,8 +70,6 @@ chown $app: "$install_dir/.env"
#=================================================
ynh_script_progression --message="Installing Python dependencies..." --weight=3
ynh_secure_remove $install_dir/.venv
if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "armel" ]
then
# Install rustup is not already installed