mirror of
https://github.com/YunoHost-Apps/matterbridge_ynh.git
synced 2024-09-03 19:36:24 +02:00
commit
486f20d075
9 changed files with 49 additions and 34 deletions
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
## Overview
|
## Overview
|
||||||
Matterbridge is a bridge between a series of chat protocols and offers a REST-API. Supported protocols are among others IRC, XMPP, Gitter, Mattermost, Slack, Discord, Telegram, Rocket.Chat, Hipchat(via xmpp), Matrix, Steam, ssh-chat and Zulip.
|
Matterbridge is a bridge between a series of chat protocols and offers a REST-API. Supported protocols are among others IRC, XMPP, Gitter, Mattermost, Slack, Discord, Telegram, Rocket.Chat, Hipchat(via xmpp), Matrix, Steam, ssh-chat and Zulip.
|
||||||
|
|
||||||
**Shipped version:** 1.21.0
|
**Shipped version:** 1.22.0
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
Matterbridge est un pont entre une série de protocoles de discussion et propose une REST-API. Les protocoles pris en charge sont entre autres IRC, XMPP, Gitter, Mattermost, Slack, Discord, Telegram, Rocket.Chat, Hipchat (via xmpp), Matrix, Steam, ssh-chat et Zulip.
|
Matterbridge est un pont entre une série de protocoles de discussion et propose une REST-API. Les protocoles pris en charge sont entre autres IRC, XMPP, Gitter, Mattermost, Slack, Discord, Telegram, Rocket.Chat, Hipchat (via xmpp), Matrix, Steam, ssh-chat et Zulip.
|
||||||
|
|
||||||
**Version incluse :** 1.21.0
|
**Version incluse :** 1.22.0
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.21.0/matterbridge-1.21.0-linux-armv6
|
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.22.0/matterbridge-1.22.0-linux-armv6
|
||||||
SOURCE_SUM=0082baafa52f22e54378927d95442b98c4494a70998dd59d34eabea39aea9b04
|
SOURCE_SUM=3c0d42c2dbd487b0918282db28276cb20253ca4dc653eaec2fda9612bb2d9e2f
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
SOURCE_FILENAME=matterbridge
|
SOURCE_FILENAME=matterbridge
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.21.0/matterbridge-1.21.0-linux-arm64
|
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.22.0/matterbridge-1.22.0-linux-arm64
|
||||||
SOURCE_SUM=214485475aa8e4d7c767e871459f3712026741ba09809ff041fee5b4ed731608
|
SOURCE_SUM=6f441fe5fd716423385db6a61a8e1b27edca11554d5449e839755356e17231bf
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
SOURCE_FILENAME=matterbridge
|
SOURCE_FILENAME=matterbridge
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.21.0/matterbridge-1.21.0-linux-64bit
|
SOURCE_URL=https://github.com/42wim/matterbridge/releases/download/v1.22.0/matterbridge-1.22.0-linux-64bit
|
||||||
SOURCE_SUM=0a321cbc90ba467d05c1bd5ec7a1c3b10fb2ba142710311b015f5e8235d39fe6
|
SOURCE_SUM=3093ed10309dd1ab474b76c5680e773e227aff1dc5ce1c78d29361284a301799
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
SOURCE_FILENAME=matterbridge
|
SOURCE_FILENAME=matterbridge
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Multi-protocols bridge for online communications",
|
"en": "Multi-protocols bridge for online communications",
|
||||||
"fr": "Connecteur entre une série de protocoles de discussion"
|
"fr": "Connecteur entre une série de protocoles de discussion"
|
||||||
},
|
},
|
||||||
"version": "1.21.0~ynh1",
|
"version": "1.22.0~ynh1",
|
||||||
"url": "https://github.com/42wim/matterbridge",
|
"url": "https://github.com/42wim/matterbridge",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "liberodark@gmail.com"
|
"email": "liberodark@gmail.com"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0.0"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [],
|
"services": [],
|
||||||
|
|
|
@ -32,6 +32,14 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring system user..." --weight=5
|
||||||
|
|
||||||
|
# Create a system user
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -41,14 +49,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring system user..." --weight=5
|
|
||||||
|
|
||||||
# Create a system user
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -24,20 +24,20 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE APP MAIN DIR
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=4
|
ynh_script_progression --message="Recreating the dedicated system user..." --weight=4
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE APP MAIN DIR
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
|
|
|
@ -48,6 +48,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=4
|
||||||
|
|
||||||
|
# Create a dedicated user (if not existing)
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -56,18 +64,25 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=2
|
ynh_script_progression --message="Upgrading source files..." --weight=2
|
||||||
|
|
||||||
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
|
# Backup the config file in the temp dir
|
||||||
|
cp -a "$final_path/matterbridge.toml" "$tmpdir/matterbridge.toml"
|
||||||
|
|
||||||
|
# Remove the app directory securely
|
||||||
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||||
|
|
||||||
|
# Copy the admin saved settings from tmp directory to final path
|
||||||
|
cp -a "$tmpdir/matterbridge.toml" "$final_path/matterbridge.toml"
|
||||||
|
|
||||||
|
# Remove the tmp directory securely
|
||||||
|
ynh_secure_remove --file="$tmpdir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=4
|
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue