mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
stop app before upgrade
This commit is contained in:
parent
8f987cc6f8
commit
1be8c6e4a6
1 changed files with 7 additions and 1 deletions
|
@ -44,6 +44,9 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#Stop the app in case database is updated
|
||||
ynh_systemd_action -a stop
|
||||
|
||||
#=================================================
|
||||
# CHECK THE PATH
|
||||
#=================================================
|
||||
|
@ -99,8 +102,11 @@ ynh_multimedia_addaccess $app
|
|||
ynh_backup_if_checksum_is_different "$final_path/app.db"
|
||||
|
||||
#set database settings as per conf file : restart server so that app.db is regenerated, then add new ldap settings
|
||||
ynh_systemd_action -a stop
|
||||
ynh_systemd_action -l "INFO in server: Starting Gevent server"
|
||||
#sleep required on low spec like raspberryPi
|
||||
sleep 2s
|
||||
ynh_systemd_action -a stop
|
||||
|
||||
conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\""
|
||||
eval sqlite3 $final_path/app.db "$conf"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue