mirror of
https://github.com/YunoHost-Apps/mautrix_telegram_ynh.git
synced 2024-09-03 19:45:55 +02:00
Merge ccccebd209
into d0ac2a1cca
This commit is contained in:
commit
67dd15e4ba
2 changed files with 35 additions and 1 deletions
|
@ -157,8 +157,17 @@ ynh_script_progression --message="Installing Mautrix-Bridge Python Module..." --
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
# Configure Mautrix-Bridge
|
# Configure Mautrix-Bridge
|
||||||
|
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||||
|
if [ -e $final_path/.rustup ]; then
|
||||||
|
sudo -u "$app" env PATH=$PATH rustup update
|
||||||
|
else
|
||||||
|
sudo -u "$app" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
|
||||||
|
fi
|
||||||
|
|
||||||
python3 -m venv $final_path
|
python3 -m venv $final_path
|
||||||
export HOME=$final_path
|
export HOME=$final_path
|
||||||
|
|
||||||
|
|
||||||
$final_path/bin/pip3 install --upgrade pip setuptools wheel
|
$final_path/bin/pip3 install --upgrade pip setuptools wheel
|
||||||
$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[e2be,speedups,qr_login] # metrics,hq_thumbnails,sqlite,formattednumbers
|
$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[e2be,speedups,qr_login] # metrics,hq_thumbnails,sqlite,formattednumbers
|
||||||
|
|
||||||
|
|
|
@ -160,11 +160,36 @@ chown $app:$app "$final_path/config.yaml"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Mautrix-Bridge Python Module..." --weight=2
|
ynh_script_progression --message="Upgrading Mautrix-Bridge Python Module..." --weight=2
|
||||||
|
|
||||||
python3 -m venv $final_path
|
# Install rustup is not already installed
|
||||||
|
# We need this to be able to install cryptgraphy
|
||||||
|
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||||
|
if [ -e $final_path/.rustup ]; then
|
||||||
|
sudo -u "$app" env PATH=$PATH rustup update
|
||||||
|
else
|
||||||
|
sudo -u "$app" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Install virtualenv if it don't exist
|
||||||
|
test -e $final_path/bin/python3 || python3 -m venv $final_path
|
||||||
export HOME=$final_path
|
export HOME=$final_path
|
||||||
|
# Install mautrix_telegram in virtualenv
|
||||||
|
|
||||||
|
# We set all necessary environement variable to create a python virtualenvironnement.
|
||||||
|
u_arg='u'
|
||||||
|
set +$u_arg;
|
||||||
|
source $final_path/bin/activate
|
||||||
|
set -$u_arg;
|
||||||
|
|
||||||
$final_path/bin/pip3 install --upgrade pip setuptools wheel
|
$final_path/bin/pip3 install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[e2be,speedups,qr_login] # metrics,hq_thumbnails,sqlite,formattednumbers
|
$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[e2be,speedups,qr_login] # metrics,hq_thumbnails,sqlite,formattednumbers
|
||||||
|
|
||||||
|
# This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does
|
||||||
|
set +$u_arg;
|
||||||
|
deactivate
|
||||||
|
set -$u_arg;
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REGISTER SYNAPSE APP-SERVICE
|
# REGISTER SYNAPSE APP-SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue