diff --git a/README_fr.md b/README_fr.md index 20e7be0..afe8c46 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po enDI est un progiciel de gestion d'entreprise. C'est l'outil de pilotage de l'activité économique et sociale entièrement dédié aux CAE ainsi qu'à toute entreprise et collectif d'entrepreneur.euse.s indépendant.e.s. -### Caractéristiques : +### Fonctionnalités - Gestion sociale des entrepreneurs - Gestion sociale et statistique de l'accompagnement pour le reporting aux financeurs diff --git a/conf/nginx.conf b/conf/nginx.conf index 5486499..2a671d3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,8 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + proxy_pass http://localhost:__PORT__; - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host:$server_port; diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index def33be..048641e 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1,6 +1,6 @@ enDI est un progiciel de gestion d'entreprise. C'est l'outil de pilotage de l'activité économique et sociale entièrement dédié aux CAE ainsi qu'à toute entreprise et collectif d'entrepreneur.euse.s indépendant.e.s. -### Caractéristiques : +### Fonctionnalités - Gestion sociale des entrepreneurs - Gestion sociale et statistique de l'accompagnement pour le reporting aux financeurs diff --git a/manifest.toml b/manifest.toml index 31dde96..bae51fb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json + packaging_format = 2 id = "endi" @@ -30,7 +32,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.init_main_permission] type = "group" @@ -43,9 +44,9 @@ ram.runtime = "50M" type = "password" [resources] - [resources.sources.main] - url = "https://framagit.org/endi/endi/-/archive/8d2d1e9cbc495dd48712d380c9f039a4e5b877dc/endi-8d2d1e9cbc495dd48712d380c9f039a4e5b877dc.tar.gz" - sha256 = "16fdee654c59c1ce1f914ca5a620fb9cebd3d2bd5e03e9d4442e68a5daf559ae" + [resources.sources.main] + url = "https://framagit.org/endi/endi/-/archive/8d2d1e9cbc495dd48712d380c9f039a4e5b877dc/endi-8d2d1e9cbc495dd48712d380c9f039a4e5b877dc.tar.gz" + sha256 = "16fdee654c59c1ce1f914ca5a620fb9cebd3d2bd5e03e9d4442e68a5daf559ae" [resources.ports] @@ -58,7 +59,26 @@ ram.runtime = "50M" admin.url = "/admin" [resources.apt] - packages = "mariadb_server python3-pip python3-venv cython3 npm python3-mysqldb libmariadb-dev-compat mariadb-client libjpeg-dev libfreetype6 libfreetype6-dev libssl-dev libxml2-dev zlib1g-dev libxslt1-dev libcairo2 libpango-1.0-0 libpangocairo-1.0-0" + packages = [ + "mariadb_server", + "python3-pip", + "python3-venv", + "cython3", + "npm", + "python3-mysqldb", + "libmariadb-dev-compat", + "mariadb-client", + "libjpeg-dev", + "libfreetype6", + "libfreetype6-dev", + "libssl-dev", + "libxml2-dev", + "zlib1g-dev", + "libxslt1-dev", + "libcairo2", + "libpango-1.0-0", + "libpangocairo-1.0-0", + ] [resources.database] type = "mysql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 334a315..028db67 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,28 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app (must be on a single line) -#REMOVEME? pkg_dependencies=( - python3-pip - python3-venv - cython3 - - npm - - python3-mysqldb - # libmariadbclient-dev - libmariadb-dev-compat - mariadb-client - - libjpeg-dev libfreetype6 libfreetype6-dev - libssl-dev - libxml2-dev - zlib1g-dev - - libxslt1-dev - libcairo2 libpango-1.0-0 libpangocairo-1.0-0 -) - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index ea82bb8..4c1d5da 100755 --- a/scripts/install +++ b/scripts/install @@ -29,13 +29,13 @@ ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir +ynh_app_setting_set --app="$app" --key=install_dir --value="$install_dir" 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" +chown -R "$app:www-data" "$install_dir" #================================================= # NGINX CONFIGURATION @@ -57,14 +57,14 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="endi.ini" --destination="$install_dir/endi.ini" chmod 500 "$install_dir/endi.ini" -chown $app:$app "$install_dir/endi.ini" +chown "$app:$app" "$install_dir/endi.ini" #================================================= # CREATE LOG DIRECTORY #================================================= mkdir "/var/log/$app" -chown -R $app:$app "/var/log/$app" +chown -R "$app:$app" "/var/log/$app" chmod 750 "/var/log/$app" #================================================= @@ -98,14 +98,14 @@ ynh_use_logrotate #================================================= 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/logfile.log" +yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/logfile.log" +ynh_systemd_action --service_name="$app" --action="start" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index bb00e30..cf6fa03 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,10 +16,10 @@ source /usr/share/yunohost/helpers #================================================= # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status $app >/dev/null +if ynh_exec_warn_less yunohost service status "$app" >/dev/null then - ynh_script_progression --message="Removing $app service integration..." --weight=1 - yunohost service remove $app + ynh_script_progression --message="Removing $app service integration..." --weight=1 + yunohost service remove "$app" fi #================================================= @@ -27,7 +27,6 @@ fi #================================================= ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 -# Remove the dedicated systemd config ynh_remove_systemd_config #================================================= @@ -35,7 +34,6 @@ ynh_remove_systemd_config #================================================= ynh_script_progression --message="Removing logrotate configuration..." --weight=1 -# Remove the app-specific logrotate config ynh_remove_logrotate #================================================= @@ -50,7 +48,6 @@ ynh_redis_remove_db "$redis_db" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= @@ -60,7 +57,6 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing log files..." --weight=1 -# Remove the log files ynh_secure_remove --file="/var/log/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index 8f72a3f..de5be0a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -54,14 +54,14 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= 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/logfile.log" +yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/logfile.log" +ynh_systemd_action --service_name=$app --action="start" #================================================= # GENERIC FINALIZATION diff --git a/tests.toml b/tests.toml index 91daf17..953b195 100644 --- a/tests.toml +++ b/tests.toml @@ -1,7 +1,9 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json + test_format = 1.0 [default] # ------------ # Tests to run - # ------------ \ No newline at end of file + # ------------