1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

Small script correction

This commit is contained in:
Krakinou 2020-04-28 23:40:02 +02:00
parent f06e133eb1
commit 2421277c81
6 changed files with 17 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
#=================================================