From b28b31c280979e9d9fa0b4deee3241f17d7e522d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 14 Apr 2018 23:11:53 +0200 Subject: [PATCH] Installation finalization --- conf/config.ini | 2 +- scripts/install | 33 ++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/conf/config.ini b/conf/config.ini index 41166bf..9700243 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -48,7 +48,7 @@ python_exec= ; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set. ; Example: ; srcdir=/home/ben/code/weboob -srcdir= +srcdir=__FINALPATH__/venv/bin/ ; Path to a file containing a valid Weboob's source list directory. ; Can be removed; defaults to "", indicating that Kresus will generate its own diff --git a/scripts/install b/scripts/install index bfd6f0d..abf5da9 100644 --- a/scripts/install +++ b/scripts/install @@ -96,24 +96,15 @@ ynh_install_nodejs 8 # Install weboob with pip #================================================= -# TODO: use virtualenv -# virtualenv "${final_path}/venv" -# ( -# set +o nounset -# source "${final_path}/venv/bin/activate" -# set -o nounset +virtualenv "${final_path}/venv" +( + set +o nounset + source "${final_path}/venv/bin/activate" + set -o nounset -# pip install --upgrade pip - -# ) -pip install weboob - -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -# chown -R $app: $final_path + pip install --upgrade pip + pip install weboob +) #================================================= # Install Kresus with npm @@ -151,6 +142,14 @@ ynh_replace_string "__NODEPATH__" "$(dirname "$nodejs_path")" ../conf/systemd.se # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chown -R $app: $final_path +chmod 600 "$final_path/config.ini" + #================================================= # RELOAD NGINX #=================================================