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

Merge pull request #45 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-11-17 20:50:09 +01:00 committed by GitHub
commit e6a4dc556e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 14 deletions

View file

@ -17,11 +17,14 @@ admindoc = "https://samr1.github.io/FitTrackee"
code = "https://github.com/SamR1/FitTrackee"
[integration]
yunohost = ">= 11.2.5"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = false
sso = false
disk = "50M"
ram.build = "50M"
ram.runtime = "50M"

View file

@ -31,11 +31,9 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/${app}.service"
ynh_backup --src_path="/etc/systemd/system/${app}_workers.service"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================

View file

@ -14,6 +14,7 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
#=================================================
# LOGROTATE
#=================================================
ynh_script_progression --message="Configuring logrotate to manage application logfiles" --weight=1
# Use logrotate to manage application logfile(s)
@ -25,7 +26,6 @@ chown -R $app:www-data /var/log/$app/
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
#=================================================
# CONFIGURE THE INSTALL SCRIPT
#=================================================
@ -90,6 +90,7 @@ ynh_script_progression --message="Adding system configurations related to $app .
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
@ -97,6 +98,7 @@ ynh_add_nginx_config
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
@ -105,16 +107,15 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log"
yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log"
#=================================================
# GENERIC FINALIZATION
#=================================================
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting the systemd services..." --weight=15

View file

@ -39,7 +39,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
ynh_remove_systemd_config --service="${app}"
ynh_remove_systemd_config --service="${app}_workers"
#=================================================
# REMOVE VARIOUS FILES
#=================================================
@ -56,7 +55,6 @@ ynh_secure_remove --file="/var/log/$app"
# Remove the redis database
ynh_redis_remove_db "$redis_db"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -28,7 +28,6 @@ chown -R $app:www-data /var/log/$app/
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -32,13 +32,11 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --action="stop" --service_name="${app}"
ynh_systemd_action --action="stop" --service_name="${app}_workers"
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=23
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
@ -80,7 +78,6 @@ pushd $install_dir
ynh_exec_warn_less pip install fittrackee==$fittrackee_version
popd
#=================================================
# Update DATABASE
#=================================================
@ -88,7 +85,6 @@ ynh_script_progression --message="Upgrading database..." --weight=1
ynh_exec_warn_less $install_dir/venv/bin/ftcli db upgrade
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -106,7 +102,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
ynh_add_systemd_config --service="${app}" --template="fittrackee.service"
ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers.service"
#=================================================
# GENERIC FINALIZATION
#=================================================