1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libretranslate_ynh.git synced 2024-09-03 19:36:00 +02:00

Fix exporting LT PID and add message about progression.

This commit is contained in:
lotigara 2024-07-20 13:00:04 +03:00
parent dc05a95e32
commit 31d66a34ae

View file

@ -31,13 +31,14 @@ pushd $install_dir
# WARNING!!! CODE BELOW WASN'T TESTED!!! RUN IN DEBUG MODE FROM SHELL!!!
# Checking if additional_languages was enabled...
if [ "$additional_languages" = true ] ; then
ynh_script_progression --message="Installing additional models..." --weight=5
# ...if yes, download models...
venv/bin/libretranslate --update-models &
# ...and then kill the libretranslate process
# because it was started after downloading models!
export LT-PID="$!"
export LT_PID="$!"
if ss -tulpen | grep '127.0.0.1:5000' ; then
kill -INT "$LT_PID"
fi