diff --git a/README.md b/README.md index 5e6af76..555562c 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ sudo yunohost app upgrade calibreweb -u https://github.com/Yunohost-Apps/calibre - [X] Multiinstance - [X] Better Multimedia integration : Integrate in Yunohost.multimedia - [X] rework LDAP integration to create user automatically -- [ ] Package_check integration +- [X] Package_check integration - [X] On backup/remove/upgrade : check for database location to update settings - [ ] enable magic link - [ ] Add cronjob to reload database diff --git a/scripts/_settings.sh b/scripts/_settings.sh index 9baa230..9cc863e 100644 --- a/scripts/_settings.sh +++ b/scripts/_settings.sh @@ -1,6 +1,6 @@ #!/bin/bash -PKG_DEPENDENCIES="sqlite3 python-dev libldap2-dev python3-pip imagemagick" +PKG_DEPENDENCIES="sqlite3 python-dev libldap2-dev libsasl2-dev libssl-dev python3-pip imagemagick" DOSSIER_MEDIA=/home/yunohost.multimedia LOG_FILE=/var/log/$app/$app.log ACCESS_LOG_FILE=/var/log/$app/$app-access.log \ No newline at end of file diff --git a/scripts/change_url b/scripts/change_url index dd12d60..1afabc0 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -118,13 +118,13 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" -l "Starting Tornado server on :8083" -t 20 #================================================= # RELOAD NGINX #================================================= ynh_script_progression --message="Reloading nginx web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 7c6a969..830ae51 100755 --- a/scripts/install +++ b/scripts/install @@ -227,11 +227,11 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reload nginx and start $app..." --weight=5 -t +ynh_script_progression --message="Reload nginx and start $app..." --weight=5 ynh_systemd_action --service_name=nginx --action=reload -ynh_systemd_action +ynh_systemd_action -l "Starting Tornado server on :8083" -t 20 #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last -t +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/restore b/scripts/restore index ab0cdf2..9600b95 100755 --- a/scripts/restore +++ b/scripts/restore @@ -109,7 +109,7 @@ yunohost service add $app --description "Browse eBook in the web" --log "/var/lo #================================================= ynh_restore_file --origin_path="/etc/logrotate.d/$app" -chown -R $app:$app /var/log/$app + #================================================= # RESTORE THE DATA DIRECTORY @@ -161,7 +161,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" -l "Starting Tornado server on :8083" -t 20 #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 6219aab..d92fcef 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,9 +13,10 @@ source /usr/share/yunohost/helpers # LOAD SETTINGS #================================================= ynh_script_progression --message="Loading installation settings..." --weight=2 -app=$YNH_APP_INSTANCE_NAME +app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) +port=$(ynh_app_setting_get $app port) path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) is_public=$(ynh_app_setting_get $app is_public) @@ -23,13 +24,14 @@ final_path=$(ynh_app_setting_get $app final_path) language=$(ynh_app_setting_get $app language) -#Get settings from database in case it has been changed in the app +#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") -#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) +upload=$(sqlite3 $final_path/app.db "SELECT config_uploading FROM settings WHERE ID=1") +ynh_app_setting_set $app upload $upload + source _settings.sh #================================================= @@ -99,7 +101,7 @@ fi if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files from $current_upstream_app_version to new_upstream_package_version..." --weight=10 + ynh_script_progression --message="Upgrading source files from $current_upstream_app_version to $new_upstream_package_version..." --weight=10 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" fi @@ -228,7 +230,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" -l "Starting Tornado server on :8083" -t 20 #================================================= # END OF SCRIPT #=================================================