mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
cleaning
This commit is contained in:
parent
da7edc2097
commit
c2e8011e9f
5 changed files with 4 additions and 13 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue