diff --git a/README.md b/README.md index e36c3f8..681ec5f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # enDI for YunoHost -[![Integration level](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![Working status](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![Working status](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![Install enDI with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/README_es.md b/README_es.md index 4d5647e..1e2c2e4 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # enDI para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![Instalar enDI con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/README_eu.md b/README_eu.md index ae53cfa..b0e792c 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # enDI YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![Instalatu enDI YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/README_fr.md b/README_fr.md index c8fbbe7..e0710be 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # enDI pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![Installer enDI avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/README_gl.md b/README_gl.md index 447aca0..d08e9f8 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # enDI para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![Instalar enDI con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 0946952..06952ce 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 enDI -[![集成程度](https://dash.yunohost.org/integration/endi.svg)](https://dash.yunohost.org/appci/app/endi) ![工作状态](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/endi.svg)](https://ci-apps.yunohost.org/ci/apps/endi/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/endi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/endi.maintain.svg) [![使用 YunoHost 安装 enDI](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=endi) diff --git a/scripts/backup b/scripts/backup index e007e63..c07fc93 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,23 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index 4c1d5da..24081f4 100755 --- a/scripts/install +++ b/scripts/install @@ -37,12 +37,6 @@ __ynh_endi_patch_src chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -ynh_add_nginx_config - #================================================= # SPECIFIC SETUP #================================================= @@ -67,14 +61,6 @@ mkdir "/var/log/$app" chown -R "$app:$app" "/var/log/$app" chmod 750 "/var/log/$app" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # SETUP APPLICATION #================================================= @@ -90,14 +76,14 @@ __ynh_endi_add_admin #================================================= ynh_script_progression --message="Configuring log rotation..." --weight=1 +ynh_add_nginx_config + +# Create a dedicated systemd config +ynh_add_systemd_config + # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/$app.log" #================================================= diff --git a/scripts/remove b/scripts/remove index cf6fa03..e856b87 100755 --- a/scripts/remove +++ b/scripts/remove @@ -22,41 +22,14 @@ then yunohost service remove "$app" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - ynh_remove_logrotate -#================================================= -# REMOVE THE REDIS DATABASE -#================================================= -ynh_script_progression --message="Removing the Redis database..." --weight=1 - ynh_redis_remove_db "$redis_db" -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing log files..." --weight=1 - ynh_secure_remove --file="/var/log/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index de5be0a..db03ef6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -20,13 +20,6 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# 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" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -39,21 +32,13 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/$app.log" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a01e039..d89b7a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -24,30 +18,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/logfile.log" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -ynh_add_nginx_config - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir/endi" - __ynh_endi_patch_src -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir/endi" +__ynh_endi_patch_src chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -76,24 +54,14 @@ __ynh_endi_migratedb #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/$app.log" #=================================================