diff --git a/scripts/upgrade b/scripts/upgrade index 6ba7e9d..a5f4ee1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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"