From 3d5c712a0a615c284f2031a404eed4f71d6b4844 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Fri, 28 Dec 2018 14:29:49 +0100 Subject: [PATCH] Correct calibre_dir in upgrade --- check_process | 2 +- scripts/upgrade | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 7180c48..91fcf3d 100644 --- a/check_process +++ b/check_process @@ -42,7 +42,7 @@ Level 1=auto Level 2=auto Level 3=auto - Level 4=0 + Level 4=na Level 5=auto Level 6=auto Level 7=auto diff --git a/scripts/upgrade b/scripts/upgrade index 91bac98..875de9c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,13 @@ admin=$(ynh_app_setting_get $app admin) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) language=$(ynh_app_setting_get $app language) -calibre_dir=$(ynh_app_setting_get $app calibre_dir) + +#Get settings from database in case it has been changed in the app +calibre_dir=$(sqlite3 $final_path/app.db "SELECT config_calibre_dir FROM settings WHERE ID=1") +#Save it in settings so that it can be used back afterward +calibre_dir=${calibre_dir%/} +ynh_app_setting_set $app calibre_dir $calibre_dir + port=$(ynh_app_setting_get $app port)