mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Update timeout to 30s for slow devices
This commit is contained in:
parent
eaf1e0264c
commit
ad8cf88718
5 changed files with 9 additions and 9 deletions
|
@ -91,7 +91,7 @@ ynh_backup --src_path="$calibre_dir" --is_big
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=5
|
ynh_script_progression --message="Starting a systemd service..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 30
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -120,7 +120,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 30
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -175,7 +175,7 @@ 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 20
|
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" --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
|
||||||
|
@ -234,7 +234,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reload nginx and start $app..." --weight=5
|
ynh_script_progression --message="Reload nginx and start $app..." --weight=5
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 30
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -165,7 +165,7 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 30
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -98,7 +98,7 @@ if version_gt "0.6.6" "$current_upstream_app_version" && [ "$current_upstream_pa
|
||||||
pip install --no-cache-dir --upgrade --target $final_path/vendor -r $final_path/requirements.txt
|
pip install --no-cache-dir --upgrade --target $final_path/vendor -r $final_path/requirements.txt
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
#set database settings as per conf file : restart server so that app.db is regenerated
|
#set database settings as per conf file : restart server so that app.db is regenerated
|
||||||
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting Gevent server" --log_path="$final_path/calibre-web.log" -t 20
|
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting Gevent server" --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
|
||||||
ynh_systemd_action --service_name=$app --action="stop"
|
ynh_systemd_action --service_name=$app --action="stop"
|
||||||
|
@ -170,9 +170,9 @@ 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 & log settings
|
#set database settings as per conf file : restart server so that app.db is regenerated, then add new ldap & log settings
|
||||||
if [ "$current_upstream_app_version" == '0.6.6' ]; then
|
if [ "$current_upstream_app_version" == '0.6.6' ]; then
|
||||||
ynh_systemd_action --service_name=$app --action="start" --line_match="server on " --log_path="$final_path/calibre-web.log" -t 20
|
ynh_systemd_action --service_name=$app --action="start" --line_match="server on " --log_path="$final_path/calibre-web.log" -t 30
|
||||||
else
|
else
|
||||||
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 30
|
||||||
fi
|
fi
|
||||||
#sleep required on low spec like raspberryPi
|
#sleep required on low spec like raspberryPi
|
||||||
sleep 2s
|
sleep 2s
|
||||||
|
@ -243,7 +243,7 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 20
|
ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t 30
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue