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

Merge pull request #40 from YunoHost-Apps/testing

Update install
This commit is contained in:
yalh76 2022-02-11 19:36:44 +01:00 committed by GitHub
commit ee782b87d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 10 deletions

View file

@ -22,7 +22,7 @@
setup_private=0
setup_public=0
upgrade=1
upgrade=1 from_commit=fc1ba62e6529bb529a413d5895398baa5f2029d7
# upgrade=1 from_commit=fc1ba62e6529bb529a413d5895398baa5f2029d7
backup_restore=1
multi_instance=1
port_already_use=1
@ -33,5 +33,5 @@
# # If the level 5 (Package linter) is forced to 1. Please add justifications here.
# Level 5=auto
;;; Upgrade options
; commit=fc1ba62e6529bb529a413d5895398baa5f2029d7
name=0.2.0
# ; commit=fc1ba62e6529bb529a413d5895398baa5f2029d7
# name=0.2.0

View file

@ -30,7 +30,7 @@ bot_synapse_adm=true
encryption=false
botadmin=$YNH_APP_ARG_BOTADMIN
botusers=$YNH_APP_ARG_BOTUSERS
if [ "$botusers" = "admin" ]
if [ "$botusers" == "admin" ]
then
botusers=$botadmin
fi
@ -104,6 +104,7 @@ ynh_install_extra_app_dependencies --repo="http://http.debian.net/debian buster-
ynh_script_progression --message="Installing dependencies..." --weight=10
ynh_install_extra_app_dependencies --repo="https://updates.signald.org unstable main" --package="$extra_dependencies" --key="https://updates.signald.org/apt-signing-key.asc"
sleep 3
#=================================================
# CREATE DEDICATED USER
@ -113,6 +114,7 @@ ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
# Add the user to the signald group. The signald group was created when the signald
# package was installed from the extra repository
# resolved by https://gitlab.com/signald/signald/-/commit/278240f3f1cc40a3b444c958b68ca3d6908e98a8
ynh_system_user_create --username=$app --groups="$signald_user"
#=================================================
@ -165,6 +167,7 @@ ynh_script_progression --message="Configuring python3 virtual environment" --wei
mkdir -p /var/log/$app
# Configure Mautrix-Bridge
python3 -m venv $final_path
export HOME=$final_path
$final_path/bin/pip3 install --upgrade pip setuptools wheel
ynh_script_progression --message="Installing Bridge with pip" --weight=6

View file

@ -53,7 +53,6 @@ synapse_db_name="matrix_$synapse_instance"
bot_synapse_db_user="@$botname:$server_name"
signald_data="/var/lib/signald"
#signald_exe="/usr/bin/signald"
signald_user="signald" # This is actually chosen by the signald dependency
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -67,9 +66,6 @@ test ! -d $final_path || ynh_die --message="There is already a directory: $final
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
# We need to install dependencies before recreating the dedicated user,
# as the dependencies create the `signald` user and group.
# Another option would be to `usermod -aG "$signald_user" $app` later.
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
@ -84,7 +80,7 @@ ynh_install_extra_app_dependencies --repo="https://updates.signald.org unstable
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --groups="$signald_user"
ynh_system_user_create --username=$app
#=================================================
# RESTORE THE APP MAIN DIR
@ -123,6 +119,7 @@ ynh_restore_file --origin_path="/var/log/$app"
#mkdir -p /var/log/$app
# Configure Mautrix-Bridge
python3 -m venv $final_path
export HOME=$final_path
$final_path/bin/pip3 install --upgrade pip setuptools wheel
# Pre-compiled python-olm to avoid libolm-dev, python3-dev

View file

@ -116,7 +116,7 @@ chmod -R g+rwX /var/lib/signald/{avatars,attachments,stickers}
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --groups="$signald_user"
ynh_system_user_create --username=$app
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -165,6 +165,7 @@ ynh_script_progression --message="Upgrading python3 virtual environment" --weigh
mkdir -p /var/log/$app
# Configure Mautrix-Bridge
python3 -m venv $final_path
export HOME=$final_path
$final_path/bin/pip3 install --upgrade pip setuptools wheel
ynh_script_progression --message="Installing with pip" --weight=6