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

Merge pull request #13 from Jibec/master

Fix installation
This commit is contained in:
LowMem 2018-08-07 23:30:03 +02:00 committed by GitHub
commit a7cd188104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 30 deletions

View file

@ -1,14 +1,27 @@
WARNING: this package has not been tested. Use it at your own risks, for testing purposes and not on a daily used server.
# Kresus for YunoHost # Kresus for YunoHost
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 on what you are spending money with the use of tags! 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 on what you are spending money with the use of tags!
It has started as a fork of cozy-pfm but is way different now. **Shipped version:** 0.13.2
It was continued following this https://framagit.org/bnjbvr/kresus/issues/515
**More information on the documentation page:** # State of this package
https://framagit.org/bnjbvr/kresus
https://kresus.org * works fine:
https://yunohost.org/
* [x] install/remove/backup/remove/upgrade with x86_64
* to be confirmed
* [x] ARM support
* to be added:
* [ ] Email support
* [ ] Restrict more file access ($app is owner of everything, we should limit it more)
* [ ] Add user who will access the app (by default every one has access to the installed app)
* [ ] Email admin about installation with ynh_send_readme_to_admin helper
## Links
* Report a bug about this package: https://github.com/YunoHost-Apps/kresus_ynh
* Report a bug about Kresus itself: https://framagit.org/kresusapp/kresus
* Kresus website: https://kresus.org
* YunoHost website: https://yunohost.org/

View file

@ -15,7 +15,6 @@
setup_private=1 setup_private=1
setup_public=0 setup_public=0
upgrade=1 upgrade=1
upgrade=1 from_commit=c1345759860b9886b51a406366d1fcc090f05012
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
incorrect_path=1 incorrect_path=1
@ -36,8 +35,4 @@
Level 10=0 Level 10=0
;;; Options ;;; Options
Email=jean-baptiste@holcroft.fr Email=jean-baptiste@holcroft.fr
Notification=all Notification=all
;;; Upgrade options
; commit=c1345759860b9886b51a406366d1fcc090f05012
name=Upgrade from old package version
manifest_arg=domain=DOMAIN&path=PATH

View file

@ -39,7 +39,7 @@ url_prefix=__PATH__
; Overridden by the KRESUS_PYTHON_EXEC environment variable, if it's set. ; Overridden by the KRESUS_PYTHON_EXEC environment variable, if it's set.
; Example: ; Example:
; python_exec=python3 ; python_exec=python3
python_exec= python_exec=__FINALPATH__/venv/bin/python
[weboob] [weboob]
; The directory in which Weboob core is stored. ; The directory in which Weboob core is stored.
@ -48,7 +48,7 @@ python_exec=
; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set. ; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set.
; Example: ; Example:
; srcdir=/home/ben/code/weboob ; srcdir=/home/ben/code/weboob
srcdir=__FINALPATH__/venv/bin/ srcdir=
; Path to a file containing a valid Weboob's source list directory. ; Path to a file containing a valid Weboob's source list directory.
; Can be removed; defaults to "", indicating that Kresus will generate its own ; Can be removed; defaults to "", indicating that Kresus will generate its own

View file

@ -1,4 +1,5 @@
location __PATH__ { #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__; proxy_pass http://127.0.0.1:__PORT__;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_redirect off; proxy_redirect off;

View file

@ -6,16 +6,16 @@
"en": "Kresus is a personal finance manager.", "en": "Kresus is a personal finance manager.",
"fr": "Kresus est un outil personnel de gestion de finances." "fr": "Kresus est un outil personnel de gestion de finances."
}, },
"url": "https://framagit.org/bnjbvr/kresus", "url": "https://framagit.org/kresusapp/kresus",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"maintainer": { "maintainer": {
"name": "Scith", "name": "Jean-Baptiste Holcroft",
"url": "https://github.com/scith" "email": "jean-baptiste@holcroft.fr"
}, },
"requirements": { "requirements": {
"yunohost": ">= 2.7.10" "yunohost": ">= 2.7.14"
}, },
"version": "0.13.2-2", "version": "0.13.2~ynh2",
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx" "nginx"

View file

@ -76,6 +76,12 @@ mkdir "$final_path/data"
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
if [ "$path_url" != "/" ]
then
ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf"
fi
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -103,7 +109,7 @@ virtualenv "${final_path}/venv"
set -o nounset set -o nounset
pip install --upgrade pip pip install --upgrade pip
pip install weboob pip install weboob html2text simplejson BeautifulSoup PyExecJS
) )
#================================================= #=================================================
@ -114,8 +120,7 @@ ynh_use_nodejs
( (
cd "$final_path" cd "$final_path"
chown -R $app: "$final_path" chown -R $app: "$final_path"
npm install --unsafe-perm npm install --production --unsafe-perm
npm run build:prod
) )
#================================================= #=================================================

View file

@ -35,7 +35,7 @@ if [ -z $final_path ]; then
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
fi fi
if [ -z "/home/ynh$app"]; then if [ -z "/home/ynh$app" ]; then
mv "/home/ynh$app/data" "$final_path/data" mv "/home/ynh$app/data" "$final_path/data"
ynh_secure_remove "/home/ynh$app" ynh_secure_remove "/home/ynh$app"
fi fi
@ -84,6 +84,11 @@ mkdir -p "$final_path/data"
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
if [ "$path_url" != "/" ]
then
ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf"
fi
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -113,7 +118,7 @@ virtualenv "${final_path}/venv"
set -o nounset set -o nounset
pip install --upgrade pip pip install --upgrade pip
pip install weboob pip install weboob html2text simplejson BeautifulSoup PyExecJS
) )
#================================================= #=================================================
@ -124,8 +129,7 @@ ynh_use_nodejs
( (
cd "$final_path" cd "$final_path"
chown -R $app: "$final_path" chown -R $app: "$final_path"
npm install --unsafe-perm npm install --production --unsafe-perm
npm run build:prod
) )
#================================================= #=================================================