1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/endi_ynh.git synced 2024-09-03 18:35:54 +02:00

Rename endi -> caerp

This commit is contained in:
Salamandar 2024-07-13 16:00:37 +02:00
parent c2b7180806
commit 5eb5ea793f
10 changed files with 144 additions and 99 deletions

View file

@ -1,5 +1,5 @@
[app:endi] [app:caerp]
use = egg:endi use = egg:caerp
pyramid.reload_templates = true pyramid.reload_templates = true
pyramid.reload_assets = true pyramid.reload_assets = true
@ -10,29 +10,30 @@ pyramid.debug_routematch = false
pyramid.debug_templates = true pyramid.debug_templates = true
pyramid.default_locale_name = fr_FR pyramid.default_locale_name = fr_FR
pyramid.includes = pyramid.includes =
pyramid_retry
pyramid_tm pyramid_tm
pyramid_services pyramid_services
endi_celery
pyramid_mailer.debug
pyramid_layout pyramid_layout
pyramid_mako pyramid_mako
pyramid_chameleon pyramid_chameleon
pyramid_celery pyramid_celery
caerp_celery
pyramid_mailer.debug
js.deform js.deform
deform_extensions deform_extensions
#### MAIL FROM WITHIN THE APPLICATION #### #### MAIL FROM WITHIN THE APPLICATION ####
# Add this one to pyramid.includes if you configured a mailbox # Add this one to pyramid.includes if you configured a mailbox
# pyramid_mailer #pyramid_mailer
# Mail configuration # Mail configuration
# Host and port are set to localhost/25 by default # Host and port are set to localhost/25 by default
# mail.host = localhost #mail.host = localhost
# mail.port = 587 #mail.port=587
# mail.username = mygmailaccount@gmail.com #mail.username=mygmailaccount@gmail.com
# mail.password = mygmailpasswd #mail.password=mygmailpasswd
# mail.tls=True #mail.tls=True
mail.default_sender = noreply@__DOMAIN__ mail.default_sender=noreply@__DOMAIN__
### Optout address for unsubscription (for local smtp purpose) ### Optout address for unsubscription (for local smtp purpose)
#mail.optout_address=unsubcribe@mail.com #mail.optout_address=unsubcribe@mail.com
## Bounce_url address (should indicate a server redirecting a query to the url passed in the url GET param) ## Bounce_url address (should indicate a server redirecting a query to the url passed in the url GET param)
@ -40,15 +41,15 @@ mail.default_sender = noreply@__DOMAIN__
#### DATABASE ACCESS CONFIGURATION #### #### DATABASE ACCESS CONFIGURATION ####
sqlalchemy.url = mysql://__DB_USER__:__DB_PWD__@localhost/__DB_NAME__?charset=utf8mb4 sqlalchemy.url = mysql://__DB_USER__:__DB_PWD__@localhost/__DB_NAME__?charset=utf8mb4
# Uncomment the following line to use vagrant # Uncomment the following line to use docker-compose
# sqlalchemy.url = mysql://endi:endi@127.0.0.1:13306/endi?charset=utf8mb4 # sqlalchemy.url = mysql://caerp:caerp@127.0.0.1:13306/caerp?charset=utf8mb4
sqlalchemy.echo=False sqlalchemy.echo=False
# Those variables should be improved to fit your configuration # Those variables should be improved to fit your configuration
sqlalchemy.pool_recycle=7200 sqlalchemy.pool_recycle=7200
sqlalchemy.pool_size=100 sqlalchemy.pool_size=100
#### MAKO SPECIFIC CONFIGURATION #### #### MAKO SPECIFIC CONFIGURATION ####
mako.directories = endi:templates mako.directories = caerp:templates
mako.imports = from markupsafe import escape_silent mako.imports = from markupsafe import escape_silent
mako.default_filters = escape_silent mako.default_filters = escape_silent
mako.module_directory = %(here)s/mako_compiled_templates mako.module_directory = %(here)s/mako_compiled_templates
@ -71,60 +72,98 @@ cache.default_term.expire = 300
cache.long_term.expire = 20 cache.long_term.expire = 20
# static file path (may be an url, allowing to have static datas on different servers) # static file path (may be an url, allowing to have static datas on different servers)
endi.static=static caerp.statics=static
# Assets (logo ...) storage path # Assets (logo ...) storage path
endi.assets = %(here)s/data/assets caerp.assets = %(here)s/data/assets
# Temp dir for compiled files (like pdf generation or large export files), # Temp dir for compiled files (like pdf generation or large export files),
# is accessible as a static directory # is accessible as a static directory
endi.static_tmp=endi:tmp caerp.static_tmp=caerp:tmp
# treasury related docs upload # treasury related docs upload
endi.ftpdir=%(here)s/tmp/filesystem caerp.ftpdir=%(here)s/tmp/filesystem
# Max filesize for file attachment (in Bytes) # Max filesize for file attachment (in Bytes)
endi.maxfilesize=2000000 caerp.maxfilesize=2000000
# The instance name # The instance name
endi.instance_name=__DOMAIN__ caerp.instance_name=__DOMAIN__
# The depot path for storing files locally # The depot path for storing files locally
endi.depot_path = %(here)s/tmp/filedepot caerp.depot_path = %(here)s/tmp/filedepot
# Tempdir for file upload (should exist) # Tempdir for file upload (should exist)
pyramid_deform.tempdir= %(here)s/tmp/tempdir pyramid_deform.tempdir= %(here)s/tmp/tempdir
# Pyramid services configuration (allow to override default behaviour for some # Pyramid services configuration (allow to override default behaviour for some
# interfaces) # interfaces)
# endi.services.treasury_invoice_writer=mypackage.InvoiceWriter ## ECRITURES ##
# endi.services.treasury_invoice_producer=mypackage.InvoiceProducer # SAGE GENERATION EXPERT
#endi.services.treasury_expense_writer=mypackage.ExpenseWriter # caerp.services.treasury_invoice_producer=caerp.compute.sage_generation_expert.compute.InvoiceProducer
#endi.services.treasury_expense_producer=mypackage.ExpenseProducer # caerp.services.treasury_internalinvoice_producer=caerp.compute.sage_generation_expert.compute.InternalInvoiceProducer
#endi.services.treasury_payment_writer=mypackage.PaymentWriter # caerp.services.treasury_invoice_writer=caerp.export.sage_generation_expert.InvoiceWriter
#endi.services.treasury_payment_producer=mypackage.PaymentProducer #
# caerp.services.treasury_payment_producer=caerp.compute.sage_generation_expert.compute.PaymentProducer
# caerp.services.treasury_internalpayment_producer=caerp.compute.sage_generation_expert.compute.InternalPaymentProducer
# caerp.services.treasury_payment_writer=caerp.export.sage_generation_expert.PaymentWriter
#
# caerp.services.treasury_expense_producer=caerp.compute.sage_generation_expert.compute.ExpenseProducer
# caerp.services.treasury_expense_writer=caerp.export.sage_generation_expert.ExpenseWriter
#
# caerp.services.treasury_expense_payment_producer=caerp.compute.sage_generation_expert.compute.ExpensePaymentProducer
# caerp.services.treasury_expense_payment_writer=caerp.export.sage_generation_expert.ExpensePaymentWriter
#
# caerp.services.treasury_supplier_invoice_producer=caerp.compute.sage_generation_expert.compute.SupplierInvoiceProducer
# caerp.services.treasury_internalsupplier_invoice_producer=caerp.compute.sage_generation_expert.compute.InternalSupplierInvoiceProducer
# caerp.services.treasury_supplier_invoice_writer=caerp.export.sage_generation_expert.SupplierInvoiceWriter
#
# caerp.services.treasury_supplier_payment_producer=caerp.compute.sage_generation_expert.compute.SupplierPaymentProducer
# caerp.services.treasury_supplier_payment_user_producer=caerp.compute.sage_generation_expert.compute.SupplierUserPaymentProducer
# caerp.services.treasury_internalsupplier_payment_producer=caerp.compute.sage_generation_expert.compute.InternalSupplierPaymentProducer
# caerp.services.treasury_supplier_payment_writer=caerp.export.sage_generation_expert.SupplierPaymentWriter
# Payment specific configuration see https://framagit.org/endi/endi_payment # CEGID
# endi_payment_db.url = mysql://endi_payment:endi@localhost/endi_payment?charset=utf8mb4 caerp.services.treasury_invoice_writer=caerp.export.cegid.InvoiceWriter
endi.interfaces.IPaymentRecordService = endi_payment.public.PaymentService
caerp.services.treasury_payment_writer=caerp.export.cegid.PaymentWriter
caerp.services.treasury_expense_writer=caerp.export.cegid.ExpenseWriter
caerp.services.treasury_expense_payment_writer=caerp.export.cegid.ExpensePaymentWriter
caerp.services.treasury_supplier_invoice_writer=caerp.export.cegid.SupplierInvoiceWriter
caerp.services.treasury_supplier_payment_writer=caerp.export.cegid.SupplierPaymentWriter
## FIN DE LA CONFIG DES ECRITURES
# Payment specific configuration see https://framagit.org/caerp/caerp_payment
# caerp_payment_db.url = mysql://caerp_payment:caerp@localhost/caerp_payment?charset=utf8mb4
caerp.interfaces.IPaymentRecordService = caerp_payment.public.PaymentService
# Log payment service # Log payment service
endi_payment.interfaces.IPaymentRecordHistoryService = endi_payment.history.HistoryLogService caerp_payment.interfaces.IPaymentRecordHistoryService = caerp_payment.history.HistoryLogService
# endi_payment.interfaces.IPaymentRecordHistoryService = endi_payment.history.HistoryDBService # caerp_payment.interfaces.IPaymentRecordHistoryService = caerp_payment.history.HistoryDBService
# Payment archiving service (here FileArchiveService) # Payment archiving service (here FileArchiveService)
# endi_payment.interfaces.IPaymentArchiveService = endi_payment.archive.FileArchiveService # caerp_payment.interfaces.IPaymentArchiveService = caerp_payment.archive.FileArchiveService
# endi_payment_archive_storage_path = %(here)s/data/payment_storage # caerp_payment_archive_storage_path = %(here)s/data/payment_storage
# Key used for accounting data upload # Key used for accounting data upload
# endi.accounting_api_key= # caerp.accounting_api_key=
# Key used to count users # Key used to count users
# endi.users_api_key= # caerp.users_api_key=
endi.includes= caerp.includes=
endi_payment caerp_payment
endi_payment.views caerp_payment.views
# URL for tiles layer for companies map ; uncomment to override
# caerp.leaflet_layer_url=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
[celery] [celery]
broker_url = redis://localhost:6379/__REDIS_DB__ broker_url = redis://127.0.0.1:6379/__REDIS_DB__
# Uncomment the following line to use docker-compose
# broker_url = redis://127.0.0.1:16379/0
imports = imports =
endi_celery.tasks.tasks caerp_celery.tasks.tasks
endi_celery.tasks.mail caerp_celery.tasks.mail
endi_celery.tasks.csv_import caerp_celery.tasks.csv_import
endi_celery.tasks.export caerp_celery.tasks.export
endi_celery.tasks.accounting_measure_compute caerp_celery.tasks.accounting_measure_compute
endi_celery.tasks.accounting_parser caerp_celery.tasks.accounting_parser
task_serializer = json task_serializer = json
accept_content= accept_content=
@ -140,7 +179,7 @@ bottom=True
[pipeline:main] [pipeline:main]
pipeline = pipeline =
fanstatic fanstatic
endi caerp
[server:main] [server:main]
use = egg:waitress#main use = egg:waitress#main
@ -148,6 +187,7 @@ host = 127.0.0.1
port = __PORT__ port = __PORT__
# Nginx reverse proxy configuration # Nginx reverse proxy configuration
# FIXME: is it legacy?
trusted_proxy = 127.0.0.1 trusted_proxy = 127.0.0.1
trusted_proxy_count = 1 trusted_proxy_count = 1
trusted_proxy_headers = x-forwarded-for x-forwarded-host x-forwarded-proto x-forwarded-port trusted_proxy_headers = x-forwarded-for x-forwarded-host x-forwarded-proto x-forwarded-port
@ -156,7 +196,7 @@ clear_untrusted_proxy_headers = yes
[pshell] [pshell]
default_shell = ipython default_shell = ipython
setup = endi.pshell.setup setup = caerp.pshell.setup
# Begin logging configuration # Begin logging configuration
@ -174,10 +214,10 @@ level = WARN
handlers = file, console handlers = file, console
propagate=1 propagate=1
[logger_endi] [logger_caerp]
level = INFO level = INFO
handlers = file, console, warnfile handlers = file, console, warnfile
qualname = endi qualname = caerp
propagate=0 propagate=0
[logger_sqlalchemy] [logger_sqlalchemy]
@ -193,7 +233,7 @@ propagate=0
level=INFO level=INFO
handlers = celery_file, console handlers = celery_file, console
propagate=0 propagate=0
qualname = endi.celery qualname = caerp.celery
[logger_alembic] [logger_alembic]
level = INFO level = INFO
@ -220,25 +260,25 @@ propagate=0
[handler_console] [handler_console]
class = endi.log.CustomStreamHandler class = caerp.log.CustomStreamHandler
args = (sys.stderr,) args = (sys.stderr,)
level = NOTSET level = NOTSET
formatter = generic formatter = generic
[handler_file] [handler_file]
class = endi.log.CustomFileHandler class = caerp.log.CustomFileHandler
args = ('/var/log/__APP__/logfile.log','a') args = ('/var/log/__APP__/logfile.log','a')
level = INFO level = INFO
formatter = generic formatter = generic
[handler_celery_file] [handler_celery_file]
class = endi.log.CustomFileHandler class = caerp.log.CustomFileHandler
args = ('/var/log/__APP__/celery.log','a') args = ('/var/log/__APP__/celery.log','a')
level = INFO level = INFO
formatter = generic formatter = generic
[handler_warnfile] [handler_warnfile]
class = endi.log.CustomFileHandler class = caerp.log.CustomFileHandler
args = ('/var/log/__APP__/warnlogfile.log','a') args = ('/var/log/__APP__/warnlogfile.log','a')
level = WARN level = WARN
formatter = generic formatter = generic
@ -258,5 +298,5 @@ format = %(asctime)-15s %(levelname)-5.5s %(message)s ([%(name)s.%(funcName)s:%(
# End logging configuration # End logging configuration
#Alembic conf #Alembic conf
[alembic] [alembic]
script_location = endi:alembic script_location = caerp:alembic
file_template = %%(slug)s_%%(rev)s file_template = %%(slug)s_%%(rev)s

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=enDI: logiciel de comptabilité pour CAE Description=CAERP: logiciel de comptabilité pour CAE
After=network.target After=network.target
[Service] [Service]

View file

@ -1,4 +1,8 @@
enDI is a business management software package. It is the management tool for economic and social activity entirely dedicated to CAEs as well as to any company and group of independent entrepreneurs. enDI is a business management software package. It is the management tool for
economic and social activity entirely dedicated to CAEs as well as to any
company and group of independent entrepreneurs.
It's the software behind the enDi and MoOGLi services.
### Features ### Features

View file

@ -1,7 +1,9 @@
enDI est un progiciel de gestion d'entreprise. c'est l'outil de pilotage de CAERP 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 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. entreprise et collectif d'entrepreneur.euse.s indépendant.e.s.
C'est le logiciel derrière les services enDi et MoOGLI.
### Fonctionnalités ### Fonctionnalités
Il permet aux entrepreneur.euse.s : Il permet aux entrepreneur.euse.s :

View file

@ -2,10 +2,10 @@
packaging_format = 2 packaging_format = 2
id = "endi" id = "caerp"
name = "enDI" name = "CAERP"
description.en = "Comptability software for CAE companies (french Communauté d'Activité et d'Emploi)" description.en = "Comptability software for CAE companies (french Communauté d'Activité et d'Emploi), the software behind enDi and MoOGLI"
description.fr = "Progiciel de gestion comptable à l'usage des CAE (Communauté d'Activité et d'Emploi)" description.fr = "Progiciel de gestion comptable à l'usage des CAE (Communauté d'Activité et d'Emploi), le logiciel de enDi et MoOGLI"
version = "2024.07.05~ynh1" version = "2024.07.05~ynh1"
@ -15,9 +15,8 @@ maintainers = ["Salamandar"]
license = "AGPL-3.0" license = "AGPL-3.0"
website = "https://endi.coop" website = "https://endi.coop"
demo = "https://demo.endi.coop" demo = "https://demo.endi.coop"
admindoc = "https://framagit.org/endi/endi"
userdoc = "https://doc.endi.coop" userdoc = "https://doc.endi.coop"
code = "https://framagit.org/endi/endi" code = "https://framagit.org/caerp/caerp"
[integration] [integration]
yunohost = ">= 11.2.12" yunohost = ">= 11.2.12"
@ -45,7 +44,7 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://framagit.org/endi/endi/-/archive/34ed0cc755e66d7150b263d8b2f9ff4881624271/endi-34ed0cc755e66d7150b263d8b2f9ff4881624271.tar.bz2" url = "https://framagit.org/caerp/caerp/-/archive/34ed0cc755e66d7150b263d8b2f9ff4881624271/endi-34ed0cc755e66d7150b263d8b2f9ff4881624271.tar.bz2"
sha256 = "c98e7210b320b5980846e9f08fe9fdf5a9eee78077e29728914cff0f71a568c7" sha256 = "c98e7210b320b5980846e9f08fe9fdf5a9eee78077e29728914cff0f71a568c7"
autoupdate.strategy = "latest_gitlab_commit" autoupdate.strategy = "latest_gitlab_commit"

View file

@ -10,17 +10,17 @@ nodejs_version=16
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================
_ynh_endi_patch_src() { _ynh_caerp_patch_src() {
# Patching requirements.txt to use system provided Cython # Patching requirements.txt to use system provided Cython
cython_version=$(cython3 --version 2>&1 | sed 's|Cython version ||') cython_version=$(cython3 --version 2>&1 | sed 's|Cython version ||')
sed -i "s|Cython=.*|Cython==$cython_version|" "$install_dir/endi/requirements.txt" sed -i "s|Cython=.*|Cython==$cython_version|" "$install_dir/caerp/requirements.txt"
} }
_ynh_endi_build_ui() { _ynh_caerp_build_ui() {
ynh_use_nodejs ynh_use_nodejs
pushd "$install_dir/endi" 2>&1 pushd "$install_dir/caerp" 2>&1
ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" --prefix js_sources install 2>&1 ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" --prefix js_sources install 2>&1
ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" --prefix vue_sources install 2>&1 ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" --prefix vue_sources install 2>&1
@ -29,11 +29,11 @@ _ynh_endi_build_ui() {
popd 2>&1 popd 2>&1
} }
_ynh_endi_build_python() { _ynh_caerp_build_python() {
_ynh_python_venv_setup --venv_dir="$install_dir/venv" _ynh_python_venv_setup --venv_dir="$install_dir/venv"
python_venv_site_packages=$(_ynh_python_venv_get_site_packages_dir -d "$install_dir/venv") python_venv_site_packages=$(_ynh_python_venv_get_site_packages_dir -d "$install_dir/venv")
pushd "$install_dir/endi" 2>&1 pushd "$install_dir/caerp" 2>&1
ynh_exec_as "$app" "$install_dir/venv/bin/python3" -m pip install -r requirements.txt ynh_exec_as "$app" "$install_dir/venv/bin/python3" -m pip install -r requirements.txt
ynh_exec_as "$app" "$install_dir/venv/bin/python3" ./setup.py install 2>&1 ynh_exec_as "$app" "$install_dir/venv/bin/python3" ./setup.py install 2>&1
popd 2>&1 popd 2>&1
@ -43,16 +43,16 @@ _ynh_endi_build_python() {
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"
} }
_ynh_endi_migratedb() { _ynh_caerp_migratedb() {
pushd "$install_dir" 2>&1 pushd "$install_dir" 2>&1
ynh_exec_as $app "$install_dir/venv/bin/endi-admin" "$install_dir/endi.ini" \ ynh_exec_as $app "$install_dir/venv/bin/caerp-admin" "$install_dir/caerp.ini" \
syncdb syncdb
popd 2>&1 popd 2>&1
} }
_ynh_endi_add_admin() { _ynh_caerp_add_admin() {
pushd "$install_dir" 2>&1 pushd "$install_dir" 2>&1
ynh_exec_as $app "$install_dir/venv/bin/endi-admin" "$install_dir/endi.ini" \ ynh_exec_as $app "$install_dir/venv/bin/caerp-admin" "$install_dir/caerp.ini" \
useradd --group=admin --user="admin" --pwd="$password" --email="admin@$domain" useradd --group=admin --user="admin" --pwd="$password" --email="admin@$domain"
popd 2>&1 popd 2>&1
} }

View file

@ -26,10 +26,10 @@ ynh_change_url_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Updating $app's configuration file..." --weight=1 ynh_script_progression --message="Updating $app's configuration file..." --weight=1
ynh_add_config --template="endi.ini" --destination="$install_dir/endi.ini" ynh_add_config --template="caerp.ini" --destination="$install_dir/caerp.ini"
chmod 500 "$install_dir/endi.ini" chmod 500 "$install_dir/caerp.ini"
chown "$app:$app" "$install_dir/endi.ini" chown "$app:$app" "$install_dir/caerp.ini"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -26,20 +26,20 @@ sed -i 's|^#\? \?\(fr_FR.UTF-8 \?.*\)$|\1|' /etc/locale.gen
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=1 ynh_script_progression --message="Setting up source files..." --weight=1
ynh_setup_source --dest_dir="$install_dir/endi" ynh_setup_source --dest_dir="$install_dir/caerp"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"
# _ynh_endi_patch_src # _ynh_caerp_patch_src
#================================================= #=================================================
# SETUP APPLICATION # SETUP APPLICATION
#================================================= #=================================================
ynh_script_progression --message="Building $app..." --weight=1 ynh_script_progression --message="Building $app..." --weight=1
_ynh_endi_build_ui _ynh_caerp_build_ui
_ynh_endi_build_python _ynh_caerp_build_python
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
@ -49,10 +49,10 @@ ynh_script_progression --message="Adding $app's configuration file..." --weight=
redis_db=$(ynh_redis_get_free_db) redis_db=$(ynh_redis_get_free_db)
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
ynh_add_config --template="endi.ini" --destination="$install_dir/endi.ini" ynh_add_config --template="caerp.ini" --destination="$install_dir/caerp.ini"
chmod 500 "$install_dir/endi.ini" chmod 500 "$install_dir/caerp.ini"
chown "$app:$app" "$install_dir/endi.ini" chown "$app:$app" "$install_dir/caerp.ini"
#================================================= #=================================================
# CREATE LOG DIRECTORY # CREATE LOG DIRECTORY
@ -67,8 +67,8 @@ chmod 750 "/var/log/$app"
#================================================= #=================================================
ynh_script_progression --message="Configuring $app..." --weight=1 ynh_script_progression --message="Configuring $app..." --weight=1
_ynh_endi_migratedb _ynh_caerp_migratedb
_ynh_endi_add_admin _ynh_caerp_add_admin
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
@ -80,7 +80,7 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
ynh_add_nginx_config ynh_add_nginx_config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log" yunohost service add "$app" --description="CAERP, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log"
ynh_use_logrotate --logfile="/var/log/$app/logfile.log" ynh_use_logrotate --logfile="/var/log/$app/logfile.log"

View file

@ -34,7 +34,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet systemctl enable "$app.service" --quiet
yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log" yunohost service add "$app" --description="CAERP, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app"

View file

@ -27,35 +27,35 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/endi" --full_replace --keep="endi.ini" ynh_setup_source --dest_dir="$install_dir/caerp" --full_replace --keep="endi.ini caerp.ini"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"
# _ynh_endi_patch_src # _ynh_caerp_patch_src
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating $app's configuration file..." --weight=1 ynh_script_progression --message="Updating $app's configuration file..." --weight=1
ynh_add_config --template="endi.ini" --destination="$install_dir/endi.ini" ynh_add_config --template="caerp.ini" --destination="$install_dir/caerp.ini"
chmod 500 "$install_dir/endi.ini" chmod 500 "$install_dir/caerp.ini"
chown "$app:$app" "$install_dir/endi.ini" chown "$app:$app" "$install_dir/caerp.ini"
#================================================= #=================================================
# SETUP APPLICATION # SETUP APPLICATION
#================================================= #=================================================
ynh_script_progression --message="Building $app..." --weight=1 ynh_script_progression --message="Building $app..." --weight=1
_ynh_endi_build_ui _ynh_caerp_build_ui
_ynh_endi_build_python _ynh_caerp_build_python
#================================================= #=================================================
# SETUP APPLICATION # SETUP APPLICATION
#================================================= #=================================================
ynh_script_progression --message="Migrating databases..." --weight=1 ynh_script_progression --message="Migrating databases..." --weight=1
_ynh_endi_migratedb _ynh_caerp_migratedb
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -66,7 +66,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log" yunohost service add "$app" --description="CAERP, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log"
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --logfile="/var/log/$app/logfile.log" ynh_use_logrotate --logfile="/var/log/$app/logfile.log"