mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Restore _common.sh var and set some comments
This commit is contained in:
parent
2875012a5f
commit
adda84094d
5 changed files with 20 additions and 2 deletions
|
@ -3,6 +3,9 @@
|
|||
PKG_DEPENDENCIES="sqlite3 libldap2-dev libsasl2-dev python3-dev imagemagick python3-lxml libjpeg-dev"
|
||||
DOSSIER_MEDIA=/home/yunohost.multimedia
|
||||
|
||||
#These var are used in init_calibre_db_settings conf file
|
||||
LOG_FILE=/var/log/$app/$app.log
|
||||
ACCESS_LOG_FILE=/var/log/$app/$app-access.log
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
# TO BE DELETED WHEN RELEASED
|
||||
|
|
|
@ -26,6 +26,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
port=$(ynh_app_setting_get $app port)
|
||||
|
||||
#Source common.sh required to be after var initialization as some variables are updated in it that are then used in the script
|
||||
#when initializing the conf file of the app
|
||||
source _common.sh
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -23,6 +23,11 @@ language=$YNH_APP_ARG_LANGUAGE
|
|||
upload=$YNH_APP_ARG_UPLOAD
|
||||
public_library=$YNH_APP_ARG_PUBLIC_LIBRARY
|
||||
|
||||
#Source common.sh required to be after var initialization as some variables are updated in it that are then used in the script
|
||||
#when initializing the conf file of the app
|
||||
source _common.sh
|
||||
|
||||
|
||||
#if app is public, we assume library is public
|
||||
if [ $is_public -eq 1 ]; then
|
||||
public_library=1
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -30,6 +29,10 @@ calibre_dir=$(ynh_app_setting_get $app calibre_dir)
|
|||
is_public=$(ynh_app_setting_get $app is_public)
|
||||
port=$(ynh_app_setting_get $app port)
|
||||
|
||||
#Source common.sh required to be after var initialization as some variables are updated in it that are then used in the script
|
||||
#when initializing the conf file of the app
|
||||
source ../settings/scripts/_common.sh
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
|
|
|
@ -27,6 +27,10 @@ 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)
|
||||
|
||||
#Source common.sh required to be after var initialization as some variables are updated in it that are then used in the script
|
||||
#when initializing the conf file of the app
|
||||
source _common.sh
|
||||
|
||||
#Get settings from database in case it has been changed in the app and save it in settings so that it can be used back afterward
|
||||
calibre_dir=$(sqlite3 $final_path/app.db "SELECT config_calibre_dir FROM settings WHERE ID=1")
|
||||
calibre_dir=${calibre_dir%/}
|
||||
|
|
Loading…
Add table
Reference in a new issue