mirror of
https://github.com/YunoHost-Apps/libretranslate_ynh.git
synced 2024-09-03 19:36:00 +02:00
Change port
This commit is contained in:
parent
ee4fd3203a
commit
593426f6b6
1 changed files with 7 additions and 7 deletions
|
@ -10,9 +10,9 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# SETUP PERMISSIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
ynh_script_progression --message="Setting up permissions..." --weight=1
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
@ -34,12 +34,12 @@ pushd $install_dir
|
||||||
ynh_script_progression --message="Installing additional models..." --weight=5
|
ynh_script_progression --message="Installing additional models..." --weight=5
|
||||||
|
|
||||||
# ...if yes, download models...
|
# ...if yes, download models...
|
||||||
venv/bin/libretranslate --update-models &
|
venv/bin/libretranslate --update-models --port 50005 &
|
||||||
|
|
||||||
# ...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
|
|
||||||
|
# ...and then kill the libretranslate WebUI / API
|
||||||
|
# because it was started after downloading models!
|
||||||
|
if ss -tulpen | grep '127.0.0.1:50005' ; then
|
||||||
kill -INT "$LT_PID"
|
kill -INT "$LT_PID"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue