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

Upgarde to 1.0.4025

This commit is contained in:
yalh76 2020-06-18 02:03:31 +02:00
parent 060d52374e
commit cc89f39aed
15 changed files with 236 additions and 144 deletions

View file

@ -7,18 +7,18 @@
Those limitations come from the packaging of the upstream app. Have to be improved. Those limitations come from the packaging of the upstream app. Have to be improved.
[![Integration level](https://dash.yunohost.org/integration/jitsi.svg)](https://dash.yunohost.org/appci/app/jitsi) [![Integration level](https://dash.yunohost.org/integration/jitsi.svg)](https://dash.yunohost.org/appci/app/jitsi) ![](https://ci-apps.yunohost.org/ci/badges/jitsi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jitsi.maintain.svg)
[![Install Jitsi Meet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jitsi) [![Install Jitsi Meet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jitsi)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install Jitsi Meet quickly and simply on a YunoHost server. > *This package allows you to install Jitsi Meet quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Jitsi Meet is a libre software (Apache) WebRTC JavaScript app that uses Jitsi Videobridge to provide high quality, secure, and scalable video conferences. Jitsi Meet is a libre software (Apache) WebRTC JavaScript app that uses Jitsi Videobridge to provide high quality, secure, and scalable video conferences.
**Shipped version:** 1.0.4025 **Shipped version:** 1.0.4127
## Important points before installing ## Important points before installing
@ -41,11 +41,11 @@ How to configure this app: Via the admin panel, a plain file with SSH, or any ot
* Official documentation: https://jitsi.org/user-faq/ * Official documentation: https://jitsi.org/user-faq/
## Specific YunoHost features ## YunoHost specific features
#### Supported architectures #### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jitsi/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jitsi/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jitsi/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jitsi/)
## Links ## Links
@ -60,7 +60,7 @@ How to configure this app: Via the admin panel, a plain file with SSH, or any ot
Developer info Developer info
---------------- ----------------
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/jitsi_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/jitsi_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
``` ```

View file

@ -7,18 +7,18 @@
Ces limitations viennent de la manière dont l'application a été empaquetée pour YunoHost. À améliorer. Ces limitations viennent de la manière dont l'application a été empaquetée pour YunoHost. À améliorer.
[![Niveau d'intégration](https://dash.yunohost.org/integration/jitsi.svg)](https://dash.yunohost.org/appci/app/jitsi) [![Niveau d'intégration](https://dash.yunohost.org/integration/jitsi.svg)](https://dash.yunohost.org/appci/app/jitsi) ![](https://ci-apps.yunohost.org/ci/badges/jitsi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jitsi.maintain.svg)
[![Installer Jitsi Meet avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jitsi) [![Installer Jitsi Meet avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jitsi)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
> *Ce paquet vous permet d'installer Jistsi Meet rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer Jitsi Meet rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
## Vue d'ensemble ## Vue d'ensemble
Jitsi Meet est un logiciel libre (Apache) dont Jitsi Videobridge, avec WebRTC Javascript, propose des vidéos-conférences de haute qualité, sécurisées et évolutives. Jitsi Meet est un logiciel libre (Apache) dont Jitsi Videobridge, avec WebRTC Javascript, propose des vidéos-conférences de haute qualité, sécurisées et évolutives.
**Version actuelle :** 1.0.4025 **Version actuelle :** 1.0.4127
## Points importants à préparer avant l'installation ## Points importants à préparer avant l'installation
@ -50,8 +50,8 @@ Comment configurer cette application: via le panneau d'administration, un fichie
#### Architectures supportées #### Architectures supportées
* x86-64b - [![Status des compilations](https://ci-apps.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jitsi/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jitsi/)
* ARMv8-A - [![Status des compilations](https://ci-apps-arm.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jitsi/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jitsi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jitsi/)
## Liens ## Liens

View file

@ -14,6 +14,8 @@
setup_private=0 setup_private=0
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 1.0.3729~ynh1
upgrade=1 from_commit=7e81cff25dd5a85a5f9b97299b2dc251f2725d4b
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
@ -27,7 +29,7 @@
Email=yalh@yahoo.com Email=yalh@yahoo.com
Notification=all Notification=all
;;; Upgrade options ;;; Upgrade options
; commit=CommitHash ; commit=7e81cff25dd5a85a5f9b97299b2dc251f2725d4b
name=Name and date of the commit. name=1.0.3729~ynh1
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -54,6 +54,13 @@ var config = {
// Disables the auto-play behavior of *all* newly created video element. // Disables the auto-play behavior of *all* newly created video element.
// This is useful when the client runs on a host with limited resources. // This is useful when the client runs on a host with limited resources.
// noAutoPlayVideo: false // noAutoPlayVideo: false
// Enable / disable 500 Kbps bitrate cap on desktop tracks. When enabled,
// simulcast is turned off for the desktop share. If presenter is turned
// on while screensharing is in progress, the max bitrate is automatically
// adjusted to 2.5 Mbps. This takes a value between 0 and 1 which determines
// the probability for this to be enabled.
// capScreenshareBitrate: 1 // 0 to disable
}, },
// Disables ICE/UDP by filtering out local and remote UDP candidates in // Disables ICE/UDP by filtering out local and remote UDP candidates in
@ -181,9 +188,9 @@ var config = {
// appKey: '<APP_KEY>' // Specify your app key here. // appKey: '<APP_KEY>' // Specify your app key here.
// // A URL to redirect the user to, after authenticating // // A URL to redirect the user to, after authenticating
// // by default uses: // // by default uses:
// // 'https://__DOMAIN__/static/oauth.html' // // 'https://jitsi-meet.example.com/static/oauth.html'
// redirectURI: // redirectURI:
// 'https://__DOMAIN__/subfolder/static/oauth.html' // 'https://jitsi-meet.example.com/subfolder/static/oauth.html'
// }, // },
// When integrations like dropbox are enabled only that will be shown, // When integrations like dropbox are enabled only that will be shown,
// by enabling fileRecordingsServiceEnabled, we show both the integrations // by enabling fileRecordingsServiceEnabled, we show both the integrations
@ -210,6 +217,21 @@ var config = {
// Default value for the channel "last N" attribute. -1 for unlimited. // Default value for the channel "last N" attribute. -1 for unlimited.
channelLastN: -1, channelLastN: -1,
// // Options for the recording limit notification.
// recordingLimit: {
//
// // The recording limit in minutes. Note: This number appears in the notification text
// // but doesn't enforce the actual recording time limit. This should be configured in
// // jibri!
// limit: 60,
//
// // The name of the app with unlimited recordings.
// appName: 'Unlimited recordings APP',
//
// // The URL of the app with unlimited recordings.
// appURL: 'https://unlimited.recordings.app.com/'
// },
// Disables or enables RTX (RFC 4588) (defaults to false). // Disables or enables RTX (RFC 4588) (defaults to false).
// disableRtx: false, // disableRtx: false,
@ -226,15 +248,26 @@ var config = {
// disabled, then bandwidth estimations are disabled. // disabled, then bandwidth estimations are disabled.
// enableRemb: false, // enableRemb: false,
// Enables ICE restart logic in LJM and displays the page reload overlay on
// ICE failure. Current disabled by default because it's causing issues with
// signaling when Octo is enabled. Also when we do an "ICE restart"(which is
// not a real ICE restart), the client maintains the TCC sequence number
// counter, but the bridge resets it. The bridge sends media packets with
// TCC sequence numbers starting from 0.
// enableIceRestart: false,
// Defines the minimum number of participants to start a call (the default // Defines the minimum number of participants to start a call (the default
// is set in Jicofo and set to 2). // is set in Jicofo and set to 2).
// minParticipants: 2, // minParticipants: 2,
// Use XEP-0215 to fetch STUN and TURN servers. // Use the TURN servers discovered via XEP-0215 for the jitsi-videobridge
// connection
// useStunTurn: true, // useStunTurn: true,
// Enable IPv6 support. // Use TURN/UDP servers for the jitsi-videobridge connection (by default
// useIPv6: true, // we filter out TURN/UDP because it is usually not needed since the
// bridge itself is reachable via UDP)
// useTurnUdp: false
// Enables / disables a data communication channel with the Videobridge. // Enables / disables a data communication channel with the Videobridge.
// Values can be 'datachannel', 'websocket', true (treat it as // Values can be 'datachannel', 'websocket', true (treat it as
@ -246,9 +279,6 @@ var config = {
// UI // UI
// //
// Use display name as XMPP nickname.
// useNicks: false,
// Require users to always specify a display name. // Require users to always specify a display name.
// requireDisplayName: true, // requireDisplayName: true,
@ -289,6 +319,14 @@ var config = {
// and microsoftApiApplicationClientID // and microsoftApiApplicationClientID
// enableCalendarIntegration: false, // enableCalendarIntegration: false,
// When 'true', it shows an intermediate page before joining, where the user can configure its devices.
// prejoinPageEnabled: false,
// If true, shows the unsafe roon name warning label when a room name is
// deemed unsafe (due to the simplicity in the name) and a password is not
// set or the lobby is not enabled.
// enableInsecureRoomNameWarning: false,
// Stats // Stats
// //
@ -331,7 +369,7 @@ var config = {
// through the JVB and use the peer to peer connection instead. When a // through the JVB and use the peer to peer connection instead. When a
// 3rd participant joins the conference will be moved back to the JVB // 3rd participant joins the conference will be moved back to the JVB
// connection. // connection.
enabled: false, enabled: true,
// Use XEP-0215 to fetch STUN and TURN servers. // Use XEP-0215 to fetch STUN and TURN servers.
// useStunTurn: true, // useStunTurn: true,
@ -341,7 +379,7 @@ var config = {
// { urls: 'stun:__DOMAIN__:4446' }, // { urls: 'stun:__DOMAIN__:4446' },
{ urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' } { urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }
], ]
// Sets the ICE transport policy for the p2p connection. At the time // Sets the ICE transport policy for the p2p connection. At the time
// of this writing the list of possible values are 'all' and 'relay', // of this writing the list of possible values are 'all' and 'relay',
@ -353,7 +391,7 @@ var config = {
// If set to true, it will prefer to use H.264 for P2P calls (if H.264 // If set to true, it will prefer to use H.264 for P2P calls (if H.264
// is supported). // is supported).
preferH264: true // preferH264: true
// If set to true, disable H.264 video codec by stripping it out of the // If set to true, disable H.264 video codec by stripping it out of the
// SDP. // SDP.
@ -368,6 +406,10 @@ var config = {
// The Google Analytics Tracking ID: // The Google Analytics Tracking ID:
// googleAnalyticsTrackingId: 'your-tracking-id-UA-123456-1' // googleAnalyticsTrackingId: 'your-tracking-id-UA-123456-1'
// Matomo configuration:
// matomoEndpoint: 'https://your-matomo-endpoint/',
// matomoSiteID: '42',
// The Amplitude APP Key: // The Amplitude APP Key:
// amplitudeAPPKey: '<APP_KEY>' // amplitudeAPPKey: '<APP_KEY>'
@ -475,6 +517,23 @@ var config = {
// If set to true all muting operations of remote participants will be disabled. // If set to true all muting operations of remote participants will be disabled.
// disableRemoteMute: true, // disableRemoteMute: true,
/**
External API url used to receive branding specific information.
If there is no url set or there are missing fields, the defaults are applied.
None of the fieds are mandatory and the response must have the shape:
{
// The hex value for the colour used as background
backgroundColor: '#fff',
// The url for the image used as background
backgroundImageUrl: 'https://example.com/background-img.png',
// The anchor url used when clicking the logo image
logoClickUrl: 'https://example-company.org',
// The url used for the image used as logo
logoImageUrl: 'https://example.com/logo-img.png'
}
*/
// brandingDataUrl: '',
// List of undocumented settings used in jitsi-meet // List of undocumented settings used in jitsi-meet
/** /**
_immediateReloadThreshold _immediateReloadThreshold

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://download.jitsi.org/stable/jicofo_1.0-549-1_all.deb SOURCE_URL=https://download.jitsi.org/stable/jicofo_1.0-589-1_all.deb
SOURCE_SUM=77607060b9db3e4b2a91bf26ccf6d56f23c6e112357fb5dfd4e6ab062ff01af3 SOURCE_SUM=29973b40292f8d017e1dfe718ac18e08908edd3b9e5039934eae67c1ab7d4a2f
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.4025-1_all.deb SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.4127-1_all.deb
SOURCE_SUM=ddd3edd7c7df0ba9e79dec4b5b8c3d19139d4540205a47fedda36352567fd5f8 SOURCE_SUM=bc72563dfe0bd5c1b6516fc824a48038597a56626d78af0e19484e8283da8475
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-web_1.0.4025-1_all.deb SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-web_1.0.4127-1_all.deb
SOURCE_SUM=60fe635ce05c7a6824e994a88f4adcb2b6e9ff176a7a4e444a70bced58c3f0b0 SOURCE_SUM=085fe0b5e576636a83743727b4934ce1c7d8f9c93353d361b5e15acb49737941
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://download.jitsi.org/stable/jitsi-videobridge2_2.1-183-gdbddd169-1_all.deb SOURCE_URL=https://download.jitsi.org/stable/jitsi-videobridge2_2.1-202-g5f9377b9-1_all.deb
SOURCE_SUM=c2dd14437e4e655818bc1c3890b75384e5980042e8475a1142540afc04555ada SOURCE_SUM=0afce2a9c591e72a69c28665f8bf48d5e9d3a4e253e6be8737b1913f4d25b29b
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

46
issue_template.md Normal file
View file

@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all.
---
**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!*
- *Otherwise, the issue may be due to Jitsi Meet itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
**Describe the bug**
*A clear and concise description of what the bug is.*
**Versions**
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
**To Reproduce**
*Steps to reproduce the behavior.*
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install jitsi
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '....'*
3. *Scroll down to '....'*
4. *See error*
**Expected behavior**
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
**Logs**
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
*If applicable and useful, add screenshots to help explain your problem.*

View file

@ -6,7 +6,7 @@
"en": "Video conferencing web application", "en": "Video conferencing web application",
"fr": "Application web de conférence vidéo" "fr": "Application web de conférence vidéo"
}, },
"version": "1.0.4025~ynh1", "version": "1.0.4127~ynh1",
"url": "https://jitsi.org/Projects/JitMeet", "url": "https://jitsi.org/Projects/JitMeet",
"license": "Apache-2.0", "license": "Apache-2.0",
"maintainer": { "maintainer": {

View file

@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
ynh_print_info --message="Managing script failure..."
ynh_clean_setup () { ynh_clean_setup () {
ynh_clean_check_starting ynh_clean_check_starting
@ -32,26 +31,19 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
#================================================= #=================================================
# STANDARD BACKUP STEPS # DECLARE DATA AND CONF FILES TO BACKUP
#================================================= #=================================================
# STOP SYSTEMD SERVICE ynh_print_info --message="Declaring files to be backed up..."
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app-videobridge --action="stop" --log_path="/var/log/$app/$app-videobridge.log"
ynh_systemd_action --service_name=$app-jicofo --action="stop" --log_path="/var/log/$app/$app-jicofo.log"
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
ynh_print_info --message="Backing up the main app directory..."
ynh_backup --src_path="$final_path" ynh_backup --src_path="$final_path"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Backing up nginx web server configuration..."
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -60,7 +52,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# BACKUP METRONOME # BACKUP METRONOME
#================================================= #=================================================
ynh_print_info --message="Backing up Metronome..."
# Backup Metronome domain conf template # Backup Metronome domain conf template
ynh_backup --src_path="/usr/share/yunohost/templates/jitsi/$domain.cfg.lua" ynh_backup --src_path="/usr/share/yunohost/templates/jitsi/$domain.cfg.lua"
@ -72,7 +63,6 @@ ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
#================================================= #=================================================
# BACKUP THE APP CONFIG # BACKUP THE APP CONFIG
#================================================= #=================================================
ynh_print_info --message="Backing up the app config..."
ynh_backup --src_path="/etc/$app" ynh_backup --src_path="/etc/$app"
@ -81,26 +71,16 @@ ynh_backup --src_path="/etc/$app"
#================================================= #=================================================
# BACKUP LOGROTATE # BACKUP LOGROTATE
#================================================= #=================================================
ynh_print_info --message="Backing up logrotate configuration..."
ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# BACKUP SYSTEMD # BACKUP SYSTEMD
#================================================= #=================================================
ynh_print_info --message="Backing up systemd configuration..."
ynh_backup --src_path="/etc/systemd/system/$app-videobridge.service" ynh_backup --src_path="/etc/systemd/system/$app-videobridge.service"
ynh_backup --src_path="/etc/systemd/system/$app-jicofo.service" ynh_backup --src_path="/etc/systemd/system/$app-jicofo.service"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log"
ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/log/$app/$app-jicofo.log"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
ynh_print_info --message="Managing script failure..."
ynh_clean_setup () { ynh_clean_setup () {
ynh_clean_check_starting ynh_clean_check_starting
@ -23,7 +22,6 @@ ynh_abort_if_errors
#================================================= #=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST # RETRIEVE ARGUMENTS FROM THE MANIFEST
#================================================= #=================================================
ynh_print_info --message="Retrieving arguments from the manifest..."
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url="/" path_url="/"
@ -44,7 +42,7 @@ videobridge_user="jvb"
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_print_info --message="Validating installation parameters..." ynh_script_progression --message="Validating installation parameters..."
final_path=/var/www/$app final_path=/var/www/$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"
@ -55,7 +53,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_print_info --message="Storing installation settings..." ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -70,7 +68,7 @@ ynh_app_setting_set --app=$app --key=videobridge_user --value=$videobridge_user
#================================================= #=================================================
# FIND AND OPEN A PORT # FIND AND OPEN A PORT
#================================================= #=================================================
ynh_print_info --message="Configuring firewall..." ynh_script_progression --message="Configuring firewall..."
# Find an available port # Find an available port
port=$(ynh_find_port --port=4443) port=$(ynh_find_port --port=4443)
@ -91,7 +89,7 @@ ynh_app_setting_set --app=$app --key=port_component --value=$port_component
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Installing dependencies..." ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
@ -100,7 +98,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_print_info --message="Setting up source files..." ynh_script_progression --message="Setting up source files..."
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
@ -141,7 +139,7 @@ done
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Configuring nginx web server..." ynh_script_progression --message="Configuring nginx web server..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
@ -149,7 +147,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_print_info --message="Configuring system user..." ynh_script_progression --message="Configuring system user..."
# Create a system user # Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path ynh_system_user_create --username=$app --home_dir=$final_path
@ -159,7 +157,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# CONFIGURE METRONOME # CONFIGURE METRONOME
#================================================= #=================================================
ynh_print_info --message="Configuring metronome..." ynh_script_progression --message="Configuring metronome..."
# Create focus user # Create focus user
@ -193,7 +191,7 @@ metronomectl adduser $videobridge_user@auth.$domain $videobridge_secret || true
#================================================= #=================================================
# CONFIGURE JITSI-VIDEOBRIDGE # CONFIGURE JITSI-VIDEOBRIDGE
#================================================= #=================================================
ynh_print_info --message="Configuring Jitsi-Videobridge..." ynh_script_progression --message="Configuring Jitsi-Videobridge..."
public_ipv4="$(curl ip.yunohost.org)" || true public_ipv4="$(curl ip.yunohost.org)" || true
private_ipv4="$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')" || true private_ipv4="$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')" || true
@ -237,7 +235,7 @@ sysctl --system || true
#================================================= #=================================================
# CONFIGURE JITSI-JICOFO # CONFIGURE JITSI-JICOFO
#================================================= #=================================================
ynh_print_info --message="Configuring Jitsi-Jicofo..." ynh_script_progression --message="Configuring Jitsi-Jicofo..."
mkdir -p "/etc/$app/jicofo" mkdir -p "/etc/$app/jicofo"
@ -260,7 +258,7 @@ cp ../conf/jitsi-jicofo-logging.properties "$jitsi_jicofo_logging_conf"
#================================================= #=================================================
# CONFIGURE JITSI-MEET # CONFIGURE JITSI-MEET
#================================================= #=================================================
ynh_print_info --message="Configuring Jitsi-Meet..." ynh_script_progression --message="Configuring Jitsi-Meet..."
mkdir -p "/etc/$app/meet" mkdir -p "/etc/$app/meet"
@ -271,14 +269,14 @@ ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --targ
#================================================= #=================================================
# CREATE LOG DIR # CREATE LOG DIR
#================================================= #=================================================
ynh_print_info --message="Creating log dir..." ynh_script_progression --message="Creating log dir..."
mkdir -p "/var/log/$app" mkdir -p "/var/log/$app"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_print_info --message="Configuring a systemd service..." ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config --service=$app-videobridge --template="jitsi-videobridge.service" ynh_add_systemd_config --service=$app-videobridge --template="jitsi-videobridge.service"
@ -287,7 +285,7 @@ ynh_add_systemd_config --service=$app-jicofo --template="jitsi-jicofo.service"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
#================================================= #=================================================
ynh_print_info --message="Storing the config file checksum..." ynh_script_progression --message="Storing the config file checksum..."
# Calculate and store the config file checksum into the app settings # Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$jitsi_videobridge_sip_communicator_conf" ynh_store_file_checksum --file="$jitsi_videobridge_sip_communicator_conf"
@ -303,7 +301,7 @@ ynh_store_file_checksum --file="$jitsi_meet_conf"
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
ynh_print_info --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path chown -R $app: $final_path
@ -314,7 +312,7 @@ chmod -R 770 /var/log/$app
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE
#================================================= #=================================================
ynh_print_info --message="Configuring log rotation..." ynh_script_progression --message="Configuring log rotation..."
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate ynh_use_logrotate
@ -322,7 +320,7 @@ ynh_use_logrotate
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_print_info --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app-videobridge --description "$app jitsi-videobridge for jitsi" --log "/var/log/$app/$app-videobridge.log" yunohost service add $app-videobridge --description "$app jitsi-videobridge for jitsi" --log "/var/log/$app/$app-videobridge.log"
yunohost service add $app-jicofo --description "$app jitsi-jicofo for jitsi" --log "/var/log/$app/$app-jicofo.log" yunohost service add $app-jicofo --description "$app jitsi-jicofo for jitsi" --log "/var/log/$app/$app-jicofo.log"
@ -330,7 +328,7 @@ yunohost service add $app-jicofo --description "$app jitsi-jicofo for jitsi" --l
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_print_info --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log" ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log"
@ -339,7 +337,7 @@ ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_print_info --message="Configuring SSOwat..." ynh_script_progression --message="Configuring SSOwat..."
# Make app public # Make app public
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
@ -347,7 +345,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_print_info --message="Reloading nginx web server..." ynh_script_progression --message="Reloading nginx web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -355,4 +353,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Installation of $app completed" ynh_script_progression --message="Installation of $app completed"

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -29,25 +29,24 @@ videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
#================================================= #=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST # REMOVE SERVICE INTEGRATION IN YUNOHOST
#================================================= #=================================================
ynh_print_info --message="Removing service integration in YunoHost..."
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) # Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app-videobridge >/dev/null if ynh_exec_warn_less yunohost service status $app-videobridge >/dev/null
then then
ynh_print_info --message="Removing $app-videobridge service..." ynh_script_progression --message="Removing $app-videobridge service..."
yunohost service remove $app-videobridge yunohost service remove $app-videobridge
fi fi
if ynh_exec_warn_less yunohost service status $app-jicofo >/dev/null if ynh_exec_warn_less yunohost service status $app-jicofo >/dev/null
then then
ynh_print_info --message="Removing $app-jicofo service..." ynh_script_progression --message="Removing $app-jicofo service..."
yunohost service remove $app-jicofo yunohost service remove $app-jicofo
fi fi
#================================================= #=================================================
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================
ynh_print_info --message="Stopping and removing the systemd service..." ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config --service=$app-videobridge ynh_remove_systemd_config --service=$app-videobridge
@ -56,7 +55,7 @@ ynh_remove_systemd_config --service=$app-jicofo
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Removing dependencies..." ynh_script_progression --message="Removing dependencies..."
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_remove_app_dependencies ynh_remove_app_dependencies
@ -66,7 +65,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_print_info --message="Removing app main directory..." ynh_script_progression --message="Removing app main directory..."
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -74,7 +73,7 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Removing nginx web server configuration..." ynh_script_progression --message="Removing nginx web server configuration..."
# Remove the dedicated nginx config # Remove the dedicated nginx config
ynh_remove_nginx_config ynh_remove_nginx_config
@ -82,7 +81,7 @@ ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE LOGROTATE CONFIGURATION # REMOVE LOGROTATE CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Removing logrotate configuration..." ynh_script_progression --message="Removing logrotate configuration..."
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
@ -90,23 +89,22 @@ ynh_remove_logrotate
#================================================= #=================================================
# CLOSE A PORT # CLOSE A PORT
#================================================= #=================================================
ynh_print_info --message="Closing a port..."
if yunohost firewall list | grep -q "\- $port$" if yunohost firewall list | grep -q "\- $port$"
then then
ynh_print_info --message="Closing port $port..." ynh_script_progression --message="Closing port $port..."
ynh_exec_warn_less yunohost firewall disallow TCP $port ynh_exec_warn_less yunohost firewall disallow TCP $port
fi fi
if yunohost firewall list | grep -q "\- $port_videobridge$" if yunohost firewall list | grep -q "\- $port_videobridge$"
then then
ynh_print_info --message="Closing port $port_videobridge..." ynh_script_progression --message="Closing port $port_videobridge..."
ynh_exec_warn_less yunohost firewall disallow UDP $port_videobridge ynh_exec_warn_less yunohost firewall disallow UDP $port_videobridge
fi fi
if yunohost firewall list | grep -q "\- $port_component$" if yunohost firewall list | grep -q "\- $port_component$"
then then
ynh_print_info --message="Closing port $port_component..." ynh_script_progression --message="Closing port $port_component..."
ynh_exec_warn_less yunohost firewall disallow TCP $port_component ynh_exec_warn_less yunohost firewall disallow TCP $port_component
fi fi
@ -115,7 +113,7 @@ fi
#================================================= #=================================================
# RECONFIGURE METRONOME # RECONFIGURE METRONOME
#================================================= #=================================================
ynh_print_info --message="Reconfiguring Metronome..." ynh_script_progression --message="Reconfiguring Metronome..."
metronomectl deluser $focus_user@auth.$domain || true metronomectl deluser $focus_user@auth.$domain || true
metronomectl deluser $videobridge_user@auth.$domain || true metronomectl deluser $videobridge_user@auth.$domain || true
@ -141,7 +139,7 @@ yunohost domain remove auth.$domain
#================================================= #=================================================
# REMOVE THE CONFIG # REMOVE THE CONFIG
#================================================= #=================================================
ynh_print_info --message="Removing the config..." ynh_script_progression --message="Removing the config..."
# Remove the log files # Remove the log files
ynh_secure_remove --file="/etc/$app" ynh_secure_remove --file="/etc/$app"
@ -152,7 +150,7 @@ sysctl --system || true
#================================================= #=================================================
# REMOVE THE LOG FILES # REMOVE THE LOG FILES
#================================================= #=================================================
ynh_print_info --message="Removing the log files..." ynh_script_progression --message="Removing the log files..."
# Remove the log files # Remove the log files
ynh_secure_remove --file="/var/log/$app" ynh_secure_remove --file="/var/log/$app"
@ -162,7 +160,7 @@ ynh_secure_remove --file="/var/log/$app"
#================================================= #=================================================
# REMOVE DEDICATED USER # REMOVE DEDICATED USER
#================================================= #=================================================
ynh_print_info --message="Removing the dedicated system user..." ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user # Delete a system user
ynh_system_user_delete --username=$app ynh_system_user_delete --username=$app
@ -171,4 +169,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Removal of $app completed" ynh_script_progression --message="Removal of $app completed"

View file

@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
ynh_print_info --message="Managing script failure..."
ynh_clean_setup () { ynh_clean_setup () {
ynh_clean_check_starting ynh_clean_check_starting
@ -24,7 +23,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info --message="Loading settings..." ynh_script_progression --message="Loading settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -42,7 +41,7 @@ port_component=$(ynh_app_setting_get --app=$app --key=port_component)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
#================================================= #=================================================
ynh_print_info --message="Validating restoration parameters..." ynh_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \ ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}" || ynh_die --message="Path not available: ${domain}${path_url}"
@ -54,21 +53,21 @@ test ! -d $final_path \
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Restoring the nginx configuration..." ynh_script_progression --message="Restoring the nginx configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
ynh_print_info --message="Restoring the app main directory..." ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
ynh_print_info --message="Recreating the dedicated system user..." ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path ynh_system_user_create --username=$app --home_dir=$final_path
@ -76,7 +75,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================
ynh_print_info --message="Restoring user rights..." ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files # Restore permissions on app files
chown -R root: $final_path chown -R root: $final_path
@ -86,7 +85,7 @@ chown -R root: $final_path
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Reinstalling dependencies..." ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
@ -96,7 +95,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CONFIGURE FIREWALL # CONFIGURE FIREWALL
#================================================= #=================================================
ynh_print_info --message="Configuring firewall..." ynh_script_progression --message="Configuring firewall..."
# Open this port # Open this port
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
@ -105,7 +104,7 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $port_videobridge
#================================================= #=================================================
# CONFIGURE METRONOME # CONFIGURE METRONOME
#================================================= #=================================================
ynh_print_info --message="Configuring metronome..." ynh_script_progression --message="Configuring metronome..."
# Create additional domains # Create additional domains
yunohost domain add auth.$domain yunohost domain add auth.$domain
@ -128,14 +127,14 @@ ynh_systemd_action --service_name=metronome --action=restart
#================================================= #=================================================
# RESTORE THE APP CONFIG # RESTORE THE APP CONFIG
#================================================= #=================================================
ynh_print_info --message="Restoring the app config..." ynh_script_progression --message="Restoring the app config..."
ynh_restore_file --origin_path="/etc/$app" ynh_restore_file --origin_path="/etc/$app"
#================================================= #=================================================
# CREATE LOG DIR # CREATE LOG DIR
#================================================= #=================================================
ynh_print_info --message="Creating log dir..." ynh_script_progression --message="Creating log dir..."
mkdir -p "/var/log/$app" mkdir -p "/var/log/$app"
chown -R $app: /var/log/$app chown -R $app: /var/log/$app
@ -143,7 +142,7 @@ chown -R $app: /var/log/$app
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================
ynh_print_info --message="Restoring the systemd configuration..." ynh_script_progression --message="Restoring the systemd configuration..."
ynh_restore_file --origin_path="/etc/systemd/system/$app-videobridge.service" ynh_restore_file --origin_path="/etc/systemd/system/$app-videobridge.service"
systemctl enable $app-videobridge.service systemctl enable $app-videobridge.service
@ -153,7 +152,7 @@ systemctl enable $app-jicofo.service
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_print_info --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app-videobridge --log "/var/log/$app/$app-videobridge.log" yunohost service add $app-videobridge --log "/var/log/$app/$app-videobridge.log"
yunohost service add $app-jicofo --log "/var/log/$app/$app-jicofo.log" yunohost service add $app-jicofo --log "/var/log/$app/$app-jicofo.log"
@ -161,7 +160,7 @@ yunohost service add $app-jicofo --log "/var/log/$app/$app-jicofo.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_print_info --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log" ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log"
ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/log/$app/$app-jicofo.log" ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/log/$app/$app-jicofo.log"
@ -169,6 +168,7 @@ ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/
#================================================= #=================================================
# RESTORE THE LOGROTATE CONFIGURATION # RESTORE THE LOGROTATE CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the logrotate configuration..."
ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app"
@ -177,7 +177,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM # RELOAD NGINX AND PHP-FPM
#================================================= #=================================================
ynh_print_info --message="Reloading nginx web server and php-fpm..." ynh_script_progression --message="Reloading nginx web server and php-fpm..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -185,4 +185,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Restoration completed for $app" ynh_script_progression --message="Restoration completed for $app"

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -31,6 +31,7 @@ focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
current_version=$(ynh_read_manifest --manifest="/etc/yunohost/apps/$app/manifest.json" --manifest_key="version" || echo 1.0) current_version=$(ynh_read_manifest --manifest="/etc/yunohost/apps/$app/manifest.json" --manifest_key="version" || echo 1.0)
@ -38,7 +39,7 @@ current_version=$(ynh_read_manifest --manifest="/etc/yunohost/apps/$app/manifest
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
ynh_print_info --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
# If final_path doesn't exist, create it # If final_path doesn't exist, create it
if [ -z "$final_path" ]; then if [ -z "$final_path" ]; then
@ -84,7 +85,7 @@ fi
# Closing port_component # Closing port_component
if yunohost firewall list | grep -q "\- $port_component$" if yunohost firewall list | grep -q "\- $port_component$"
then then
ynh_print_info --message="Closing port $port_component..." ynh_script_progression --message="Closing port $port_component..."
ynh_exec_warn_less yunohost firewall disallow TCP $port_component ynh_exec_warn_less yunohost firewall disallow TCP $port_component
fi fi
@ -92,7 +93,7 @@ fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_print_info --message="Backing up the app before upgrading (may take a while)..." ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -109,7 +110,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_print_info --message="Stopping a systemd service..." ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app-videobridge --action="stop" --log_path="/var/log/$app/$app-videobridge.log" ynh_systemd_action --service_name=$app-videobridge --action="stop" --log_path="/var/log/$app/$app-videobridge.log"
ynh_systemd_action --service_name=$app-jicofo --action="stop" --log_path="/var/log/$app/$app-jicofo.log" ynh_systemd_action --service_name=$app-jicofo --action="stop" --log_path="/var/log/$app/$app-jicofo.log"
@ -120,7 +121,7 @@ ynh_systemd_action --service_name=$app-jicofo --action="stop" --log_path="/var/l
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_print_info --message="Upgrading source files..." ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
declare -A packages declare -A packages
@ -161,7 +162,7 @@ fi
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Upgrading nginx web server configuration..." ynh_script_progression --message="Upgrading nginx web server configuration..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
@ -169,7 +170,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Upgrading dependencies..." ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
@ -178,7 +179,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_print_info --message="Making sure dedicated system user exists..." ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing) # Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path ynh_system_user_create --username=$app --home_dir=$final_path
@ -188,7 +189,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# CONFIGURE JITSI-VIDEOBRIDGE # CONFIGURE JITSI-VIDEOBRIDGE
#================================================= #=================================================
ynh_print_info --message="Configuring Jitsi-Videobridge..." ynh_script_progression --message="Configuring Jitsi-Videobridge..."
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
@ -236,7 +237,7 @@ fi
#================================================= #=================================================
# CONFIGURE JITSI-JICOFO # CONFIGURE JITSI-JICOFO
#================================================= #=================================================
ynh_print_info --message="configuring Jitsi-Jicofo..." ynh_script_progression --message="configuring Jitsi-Jicofo..."
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
@ -267,7 +268,7 @@ fi
#================================================= #=================================================
# CONFIGURE JITSI-MEET # CONFIGURE JITSI-MEET
#================================================= #=================================================
ynh_print_info --message="Configuring Jitsi-Meet..." ynh_script_progression --message="Configuring Jitsi-Meet..."
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
@ -279,18 +280,10 @@ then
ynh_store_file_checksum --file="$jitsi_meet_conf" ynh_store_file_checksum --file="$jitsi_meet_conf"
fi fi
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_print_info --message="Upgrading logrotate configuration..."
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_print_info --message="Upgrading systemd configuration..." ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config --service=$app-videobridge --template="jitsi-videobridge.service" ynh_add_systemd_config --service=$app-videobridge --template="jitsi-videobridge.service"
@ -301,7 +294,7 @@ ynh_add_systemd_config --service=$app-jicofo --template="jitsi-jicofo.service"
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
ynh_print_info --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files # Set permissions on app files
chown -R root: $final_path chown -R root: $final_path
@ -310,25 +303,41 @@ chown -R $app: /var/log/$app
chmod -R 770 /var/log/$app chmod -R 770 /var/log/$app
#================================================= #=================================================
# SETUP SSOWAT # SETUP LOGROTATE
#================================================= #=================================================
ynh_print_info --message="Upgrading SSOwat configuration..." ynh_script_progression --message="Upgrading logrotate configuration..."
# Make app public # Use logrotate to manage app-specific logfile(s)
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_use_logrotate --non-append
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app-videobridge --description "$app jitsi-videobridge for jitsi" --log "/var/log/$app/$app-videobridge.log"
yunohost service add $app-jicofo --description "$app jitsi-jicofo for jitsi" --log "/var/log/$app/$app-jicofo.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_print_info --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log" ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="/var/log/$app/$app-videobridge.log"
ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/log/$app/$app-jicofo.log" ynh_systemd_action --service_name=$app-jicofo --action="start" --log_path="/var/log/$app/$app-jicofo.log"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# Make app public
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_print_info --message="Reloading nginx web server..." ynh_script_progression --message="Reloading nginx web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -336,4 +345,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Upgrade of $app completed" ynh_script_progression --message="Upgrade of $app completed"