mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
commit
773efb3720
8 changed files with 30 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "FitTrackee"
|
|||
description.en = "Self-hosted outdoor activity tracker 🚴"
|
||||
description.fr = "Traqueur d’activités extérieures auto-hébergé 🚴"
|
||||
|
||||
version = "0.7.31~ynh1"
|
||||
version = "0.7.32~ynh1"
|
||||
|
||||
maintainers = ["Thovi98"]
|
||||
|
||||
|
|
|
@ -16,6 +16,21 @@ source /usr/share/yunohost/helpers
|
|||
admin=$(ynh_user_get_info --username=$admin --key=username)
|
||||
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
if [ -z "${weather_api_provider:-}" ]; then
|
||||
weather_api_provider=$weather_provider
|
||||
ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider
|
||||
fi
|
||||
|
||||
if [ -z "${weather_api_key:-}" ]; then
|
||||
weather_api_key=$weather_key
|
||||
ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key
|
||||
fi
|
||||
|
||||
if [ -z "${redis_db:-}" ]; then
|
||||
redis_db=$(ynh_redis_get_free_db)
|
||||
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -16,9 +16,4 @@ test_format = 1.0
|
|||
# Commits to test upgrade from
|
||||
# -------------------------------
|
||||
|
||||
test_upgrade_from.d682f12.name = "0.7.25~ynh3"
|
||||
test_upgrade_from.e48197d.name = "0.7.26"
|
||||
test_upgrade_from.33f7a78.name = "0.7.27"
|
||||
test_upgrade_from.ac79c26.name = "0.7.28"
|
||||
test_upgrade_from.f52002b.name = "0.7.29"
|
||||
test_upgrade_from.520a85f.name = "0.7.30"
|
||||
|
||||
|
|
Loading…
Reference in a new issue