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

Merge pull request #44 from YunoHost-Apps/Testing

Fix weird stuff
This commit is contained in:
Krakinou 2020-05-25 23:37:52 +02:00 committed by GitHub
commit a74c976763
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -4,6 +4,8 @@ PKG_DEPENDENCIES="sqlite3 libldap2-dev libsasl2-dev python3-dev imagemagick pyth
#PKG_DEPENDENCIES="sqlite3 python3-pip imagemagick" #PKG_DEPENDENCIES="sqlite3 python3-pip imagemagick"
DOSSIER_MEDIA=/home/yunohost.multimedia DOSSIER_MEDIA=/home/yunohost.multimedia
LOG_FILE=/var/log/$app/$app.log
ACCESS_LOG_FILE=/var/log/$app/$app-access.log
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS

View file

@ -6,7 +6,6 @@
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
@ -21,15 +20,14 @@ admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE language=$YNH_APP_ARG_LANGUAGE
upload=$YNH_APP_ARG_UPLOAD upload=$YNH_APP_ARG_UPLOAD
public_library=$7YNH_APP_ARG_PUBLIC_LIBRARY public_library=$YNH_APP_ARG_PUBLIC_LIBRARY
#if app is public, we assume library is public #if app is public, we assume library is public
if [ $is_public -eq 1 ]; then if [ $is_public -eq 1 ]; then
public_library=1 public_library=1
fi fi
LOG_FILE=/var/log/$app/$app.log source _common.sh
ACCESS_LOG_FILE=/var/log/$app/$app-access.log
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
@ -179,7 +177,9 @@ chown -R $app:$app /var/log/$app
#================================================= #=================================================
ynh_script_progression --message="Setting up database and settings..." --weight=5 ynh_script_progression --message="Setting up database and settings..." --weight=5
#we need to start and stop the service so that initial app.db file is created and that we can set default data #we need to start and stop the service so that initial app.db file is created and that we can set default data
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" --log_path="$final_path/calibre-web.log" -t 30 #If port 8083 is already in use (ex for second instance), then service start will fail, which is expected : so we do not want
#to set $port on the line match. "server on" will be displayed in case the port is already in use and should be ok to spot the fact that the database is initialized.
ynh_systemd_action --service_name=$app --action="start" --line_match="server on " --log_path="$final_path/calibre-web.log" -t 30
#sleep required on low spec like raspberryPi #sleep required on low spec like raspberryPi
sleep 2s sleep 2s
#remove unwanted calibre-web.log #remove unwanted calibre-web.log