1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kresus_ynh.git synced 2024-09-03 19:36:10 +02:00

Upgrade Kresus to 0.17.2

This commit is contained in:
nicofrand 2021-04-19 17:53:19 +02:00 committed by Nicolas Frandeboeuf
parent 5fa1972f44
commit 8527c5d0a9
6 changed files with 124 additions and 83 deletions

View file

@ -1,6 +1,6 @@
# Kresus for YunoHost
[![Integration level](https://dash.yunohost.org/integration/kresus.svg)](https://dash.yunohost.org/appci/app/kresus) ![](https://ci-apps.yunohost.org/ci/badges/kresus.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/kresus.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/kresus.svg)](https://dash.yunohost.org/appci/app/kresus) ![](https://ci-apps.yunohost.org/ci/badges/kresus.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/kresus.maintain.svg)
[![Install Kresus with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kresus)
> *This package allows you to install Kresus quickly and simply on a YunoHost server.
@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
Kresus is an open-source libre self-hosted personal finance manager. It allows you to safely track your banking history, check your overall balance and know exactly how you are spending money using categories!
**Shipped version:** 0.16.0
**Shipped version:** 0.17.2
## Screenshots
@ -61,7 +61,7 @@ Kresus is an open-source libre self-hosted personal finance manager. It allows y
* Report a bug about Kresus itself: https://framagit.org/kresusapp/kresus
* Kresus website: https://kresus.org
* YunoHost website: https://yunohost.org
---
## Developer info

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.16.0/kresus-0.16.0.tar.bz2
SOURCE_SUM=cf1757f317f1cc3cb659af0a76ed5ff2e0b00b9af19e7e30bec6518466ab6e97
SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.17.2/kresus-0.17.2.tar.bz2
SOURCE_SUM=57f6405358221e322b96df61259abb10cece91ba7e8ee3c27677fb37e08d946c
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,7 @@
; Hi there! This is the configuration file for Kresus. Please make sure to
; read all the options before setting up Kresus for the first time.
; Hi there! This is the configuration file for
; Kresus. Please make sure to read all the options before setting up
; Kresus for the first time.
;
[kresus]
; This is where Kresus stores additional data, as the latest bank scrapping
@ -11,27 +13,31 @@
; dataDir=/home/ben/.kresus
datadir=__FINALPATH__/data/
; The host on which the Kresus server will listen to.
; Can be removed; defaults to "127.0.0.1".
; Overridden by the HOST environment variable, if it's set.
host=127.0.0.1
; A user id obtained from using the "kresus create-user" command.
; This allows sharing a single database with several users. If your
; instance is only planned to host a single user, you can keep it
; disabled, and Kresus will know how to automatically generate a new
; user.
; Overriden by the KRESUS_USER_ID environment variable, if it's set.
; Example:
; userid=1
userid=
; This is the port that Kresus will run on. It is recommended not to
; expose it on port 80 directly but to use a reverse-proxy configuration
; like Nginx, Caddy or Apache.
; This is the port that Kresus will run on. It is recommended not
; to expose it on port 80 directly but to use a reverse-proxy
; configuration like Nginx, Caddy or Apache.
; Can be removed; defaults to 9876.
; Overridden by the PORT environment variable, if it's set.
; Overriden by the PORT environment variable, if it's set.
; Example:
; port=9876
port=__PORT__
; The directory prefix in the URL, if Kresus is to be served from a
; subdirectory. For instance, if your website is hosted at example.com and
; the url prefix is "money", then Kresus will be reachable at
; example.com/money.
; Can be removed; defaults to "", i.e. Kresus has its own (sub)domain.
; Overridden by the KRESUS_URL_PREFIX environment variable, if it's set.
; The host on which the Kresus server will listen to.
; Can be removed; defaults to 127.0.0.1.
; Overriden by the HOST environment variable, if it's set.
; Example:
; url_prefix=/money
url_prefix=__PATH__
; host=127.0.0.1
host=127.0.0.1
; The executable version of Python that is going to get used when interacting
; with Python scripts. This can be python, python2 or python3.
@ -41,6 +47,17 @@ url_prefix=__PATH__
; python_exec=python3
python_exec=__FINALPATH__/venv/bin/python
; The directory prefix in the URL, if Kresus is to be served from a
; subdirectory. For instance, if your website is hosted at example.com
; and the url prefix is "money", then Kresus will be reachable at
; example.com/money. By default, it's '', meaning that Kresus has its own
; subdomain.
; Can be removed; defaults to "".
; Overriden by the KRESUS_URL_PREFIX environment variable, if it's set.
; Example:
; url_prefix=/money
url_prefix=__PATH__
; A salt value used in encryption algorithms (used for instance to
; encrypt/decrypt exports). It should be a random string value with
; at least 16 characters if you decide to provide it.
@ -69,33 +86,38 @@ force_demo_mode=
; auth=foo:bar
auth=
[weboob]
; The directory in which Weboob core is stored.
; Can be removed; defaults to "", indicating that weboob is already in the
; PYTHON_PATH (e.g. installed at the global level).
; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set.
[woob]
; The directory in which Woob core is stored. If empty, indicates
; that woob is already in the PYTHON_PATH (e.g. installed at the global
; level)
; Overriden by the KRESUS_WOOB_DIR environment variable, if it's set.
; Example:
; srcdir=/home/ben/code/weboob
; srcdir=/home/ben/code/woob
srcdir=
; Path to a file containing a valid Weboob's source list directory.
; Can be removed; defaults to "", indicating that Kresus will generate its own
; source list file and will store it in ${datadir}/weboob-data/sources.list.
; Overridden by the KRESUS_WEBOOB_SOURCES_LIST environment variable, if it's
; set.
; Path to a file containing a valid Woob's source list directory.
; If empty (the default), indicates that Kresus will generate its own
; source list file and will store it in
; KRESUS_DIR/woob-data/sources.list.
; Overriden by the KRESUS_WOOB_SOURCES_LIST environment variable, if it's set.
; Example:
; sources_list/home/ben/code/weboob/sources.list
; sources_list=/home/ben/code/woob/sources.list
sources_list=
[email]
; The transport method you want to use. Can be either:
; * "sendmail": relies on sendmail executable to be available on your system
; and only sendmail-specific parameters are used,
; * "smtp": you should provide proper SMTP credentials to use, in the dedicated
; configuration entries.
; * "sendmail": relies on sendmail executable to be available on your
; system and only sendmail-specific parameters are used,
;
; Can be removed; defaults to "", which means no emails will be sent.
; Overridden by the KRESUS_EMAIL_TRANSPORT environment variable, if it's set.
; * "smtp": you should provide proper SMTP credentials to use, in the
; dedicated configuration entries.
;
; If empty, no emails will be sent by Kresus.
; Overriden by the KRESUS_EMAIL_TRANSPORT environment variable, if it's set.
; Example:
; transport=smtp
transport=sendmail
; The path to the sendmail executable to use.
@ -105,44 +127,55 @@ transport=sendmail
; set.
sendmail_bin=
; The email address from which email alerts will be sent. Make sure that
; your domain DNS is correctly configured and that you've done what's
; needed to prevent email alerts from landing in the spam folder.
; Can be removed; defaults to "", which means no email will be sent.
; Overridden by the KRESUS_EMAIL_FROM environment variable, if it's set.
; The email address from which email alerts will be sent. Make sure
; that your domain DNS is correctly configured and that you've done
; what's needed to prevent email alerts from landing in the spam folder.
; Overriden by the KRESUS_EMAIL_FROM environment variable, if it's set.
; Example:
; from=kresus@domain.tld
from=__APP__@__DOMAIN__
; The network address (ipv4, ipv6 or FQDN) of the SMTP server.
; Can be removed; defaults to "", which means no email will be sent.
; Overridden by the KRESUS_EMAIL_HOST environment variable, if it's set.
; Overriden by the KRESUS_EMAIL_HOST environment variable, if it's set.
; Example:
; host=mail.domain.tld
host=127.0.0.1
; The port to which the SMTP server listens. Default values tend to be
; 25 (server to server), or 587 (clients to server), or 465 (nonstandard).
; Can be removed; defaults to "", which means no email will be sent.
; Overridden by the KRESUS_EMAIL_PORT environment variable, if it's set.
; The port to which the SMTP server listens. Default values tend to
; be: 25 (server to server), or 587 (clients to server), or 465
; (nonstandard).
; Overriden by the KRESUS_EMAIL_PORT environment variable, if it's set.
; Example:
; port=465
port=465
; The username used during authentication to the SMTP server.
; Can be removed; defaults to "", which means an anonymous connection.
; Overridden by the KRESUS_EMAIL_USER environment variable, if it's set.
; The username used during authentication to the SMTP server. If
; empty, indicates an anonymous connection will be used.
; Overriden by the KRESUS_EMAIL_USER environment variable, if it's set.
; Example:
; user=login
user=
; The password used during authentication to the SMTP server.
; Can be removed; defaults to "", which means no password.
; Overridden by the KRESUS_EMAIL_PASSWORD environment variable, if it's set.
; The password used during authentication to the SMTP server. If
; empty, indicates no password will be used.
; Overriden by the KRESUS_EMAIL_PASSWORD environment variable, if it's set.
; Example:
; password=hunter2
password=
; If set to true, will force using a TLS connection. By default, emails
; are sent with STARTTLS, i.e. using TLS if available.
; If set to true, will force using a TLS connection. By default,
; emails are sent with STARTTLS, i.e. using TLS if available.
; Can be removed; defaults to false.
; Overridden by the KRESUS_EMAIL_FORCE_TLS environment variable, if it's set.
; Overriden by the KRESUS_EMAIL_FORCE_TLS environment variable, if it's set.
; Example:
; force_tls=false
force_tls=false
; If set to false, will allow self-signed TLS certificates.
; Can be removed; defaults to true.
; Overridden by the KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS environment
; variable, if it's set.
; Overriden by the KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS environment variable, if it's set.
; Example:
; reject_unauthorized_tls=true
reject_unauthorized_tls=true
[notifications]
@ -156,12 +189,13 @@ reject_unauthorized_tls=true
; appriseApiBaseUrl=http://localhost:8000/
appriseApiBaseUrl=
[logs]
; The path to the log file to use.
; Can be removed; defaults to kresus.log in kresus' datadir.
; Overridden by the KRESUS_LOG_FILE environment variable, if it's set.
; Logs will still be written to stdout.
; The path to the log file to use. If empty, defaults to kresus.log
; in datadir.
; Overriden by the KRESUS_LOG_FILE environment variable, if it's set.
; Example:
; log_file=/var/log/kresus.log
log_file=
[db]
@ -197,16 +231,23 @@ log=
; sqlite_path=/tmp/dev.sqlite
sqlite_path=
; Host address of the database server. Required for postgres.
; Path to a directory containing a Unix socket to connect to the
; database, or host address of the database server. Required for postgres.
;
; If using a Unix socket, the socket file's name will be inferred from the
; standard postgres name and the port number.
; Can be removed; defaults to localhost for postgres.
; Overriden by the KRESUS_DB_HOST environment variable, if it's set.
; Example:
; host=localhost
host=localhost
; Port of the database server. Required for postgres.
; Port of the database server. Required for postgres, even when
; using a Unix socket (the port is used to compute the socket's file name).
; Can be removed; defaults to 5432 for postgres.
; Overriden by the KRESUS_DB_PORT environment variable, if it's set.
; Example:
; port=5432 # postgres
; port=5432
port=5432
; Username to connect to the database server. Required for postgres.

View file

@ -21,7 +21,7 @@
"requirements": {
"yunohost": ">= 3.8.1"
},
"version": "0.16.0~ynh5",
"version": "0.17.2~ynh1",
"multi_instance": true,
"services": [
"nginx"

View file

@ -108,9 +108,9 @@ ynh_script_progression --message="Installing nodejs"
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# Install weboob with pip
# Install woob with pip
#=================================================
ynh_script_progression --message="Installing weboob"
ynh_script_progression --message="Installing woob"
virtualenv --python=python3 --system-site-packages "${final_path}/venv"
(
@ -119,7 +119,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
set -o nounset
pip install --upgrade pip
pip install weboob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
pip install woob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
)
#=================================================

View file

@ -134,9 +134,9 @@ ynh_script_progression --message="Installing nodejs"
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# Install weboob with pip
# Install woob with pip
#=================================================
ynh_script_progression --message="Installing weboob"
ynh_script_progression --message="Installing woob"
ynh_secure_remove --file="${final_path}/venv"
virtualenv --python=python3 --system-site-packages "${final_path}/venv"
@ -146,7 +146,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
set -o nounset
pip install --upgrade pip
pip install weboob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
pip install woob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
)
#=================================================
@ -215,18 +215,18 @@ chmod -R 750 "$final_path/data/"
chown $app "$final_path/config.ini"
chmod 600 "$final_path/config.ini"
if [ -f "$final_path/data/weboob-data/backends" ]
if [ -f "$final_path/data/woob-data/backends" ]
then
chmod 600 "$final_path/data/weboob-data/backends"
chmod 600 "$final_path/data/woob-data/backends"
fi
#=================================================
# START SYSTEMD SERVICE
# RESTART SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_script_progression --message="Restarting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start"
ynh_systemd_action --service_name=$app --action="restart"
#=================================================
# RELOAD NGINX