Compare commits

..

113 Commits

Author SHA1 Message Date
Luis Guzmán 8eeb286def Merge pull request 'README.md: update Jigasi mention now using Vosk.' (#117) from Ark74/quick-jibri-installer:upd_readme_jigasi into master
Reviewed-on: #117
2024-08-30 01:10:31 +00:00
Luis Guzmán 61698d06b4 README.md: update Jigasi mention now using Vosk. 2024-08-29 19:09:35 -06:00
Luis Guzmán 6b1e50f7b5 jigasi: update jigasi configuration. (#115)
Reviewed-on: #115
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-08-30 00:51:27 +00:00
Luis Guzmán 0a7fd8dfd9 quick_jibri_installer.sh: start migration to configure via patches. (#116)
Reviewed-on: #116
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-08-29 23:48:16 +00:00
Luis Guzmán b9b5d2e326 jigasi: re-enable jigasi now powered by VOSK backend. (#114)
- quick_jibri_installer.sh: re-enable jigasi on the main QJI
- jigasi: re-enable jigasi now powered by VOSK backend.

Reviewed-on: #114
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-08-29 04:45:19 +00:00
Luis Guzmán 11c261959f Merge pull request 'quick_jibri_installer.sh: fix change on folder naming scheme.' (#113) from Ark74/quick-jibri-installer:fix_jibri_rename_folder into master
Reviewed-on: #113
2024-08-28 23:05:36 +00:00
Luis Guzmán 33f1967c6d quick_jibri_installer.sh: fix change on folder naming scheme. 2024-08-28 17:02:32 -06:00
Luis Guzmán 22c1b881ae v7.4.1 (#112)
* fix etherpad nginx configuration
* fix live streaming not enabled by default

Reviewed-on: #112
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-07-17 02:14:37 +00:00
Luis Guzmán 40b84218fc v7.4 final (#111)
- misc: strip jibri.conf file, remove deprecated functions, improve style.
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-07-06 22:23:38 +00:00
Luis Guzmán b8e1ee292f Merge pull request 'v7.4' (#110) from Ark74/quick-jibri-installer:wip_qji_7.4 into master
Reviewed-on: #110
2024-07-05 17:49:30 +00:00
Luis Guzmán 8ff04e8850 update brandless svg watermark2 file and replace favicon. 2024-07-04 02:29:52 -06:00
Luis Guzmán 9753cf1bcb upgrade grafana nginx setup 2024-07-04 01:49:38 -06:00
Luis Guzmán 647bce26e6 Revert "return to localhost on most grafana."
This reverts commit 1638096ba7.
2024-07-04 00:08:46 -06:00
Luis Guzmán 1638096ba7 return to localhost on most grafana. 2024-07-03 21:58:19 -06:00
Luis Guzmán 998ca69ddf testing updates for grafana 2024-07-03 12:22:49 -06:00
Luis Guzmán 9a5364b2c6 misc: add match test, disable options, add brandless svg 2024-07-03 08:29:09 -06:00
Luis Guzmán a290c636ba misc: 2024 update copyright year.
Reviewed-on: #109
2024-03-21 20:10:28 +00:00
Luis Guzmán 67442f6133 misc: 2024 update copyright year. 2024-03-21 14:09:38 -06:00
Luis Guzmán 2a58bdd8a6 jitsi-updater.sh: add last call to check_lst_cd
Reviewed-on: #108
2024-03-21 20:04:35 +00:00
Luis Guzmán b8b15b4e9c jitsi-updater.sh: add last call to check_lst_cd 2024-03-21 14:03:42 -06:00
Luis Guzmán aec2d9898c jitsi-updater.sh: improve upgrade functions
Reviewed-on: #107
2024-03-21 19:24:00 +00:00
Luis Guzmán f557e3cc2f jitsi-updater.sh: improve upgrade functions 2024-03-21 13:22:30 -06:00
Luis Guzmán a7a9768b6f prepare_php.sh: add missing install_ifnot function (#106)
Reviewed-on: #106
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-03-21 19:07:15 +00:00
Luis Guzmán cda665246e jra_nextcloud.sh: update setup for nextcloud v28
Reviewed-on: #105

* files: set configuration file for NCv28
* tools: add standalone prepare_php.sh script.
* jra_nextcloud.sh: split prepare php environment.
Co-authored-by: Ark74 <ark@switnet.org>
Co-committed-by: Ark74 <ark@switnet.org>
2024-01-23 08:46:53 +00:00
Luis Guzmán a943997ea9 quick_jibri_installer.sh: fix indention style
Reviewed-on: #104
2023-11-21 08:38:01 +00:00
Luis Guzmán 2da6a817e8 Merge branch 'master' into fix_indention_style1 2023-11-21 08:35:21 +00:00
Luis Guzmán d86fb7bf3c excalidraw-backend.sh: add restart function and update others.
Reviewed-on: #103
2023-11-21 08:19:42 +00:00
Luis Guzmán b7e81a0499 excalidraw-backend.sh: move function to its place and fix printf use. 2023-11-21 02:15:49 -06:00
Luis Guzmán b9eecab00d excalidraw-backend.sh: update string for match test and add restart services function. 2023-11-21 02:03:59 -06:00
Luis Guzmán 3a35cfa1b4 quick_jibri_installer.sh: yet another style fix 2023-11-14 11:32:43 -06:00
Luis Guzmán 79c5ea566f quick_jibri_installer.sh: extra care to meet style. 2023-11-13 23:59:59 -06:00
Luis Guzmán a40d5f5aa8 quick_jibri_installer.sh: force IPv4 public ip retrieval. 2023-11-13 22:42:27 -06:00
Luis Guzmán 5a9ae4d5f5 quick_jibri_installer.sh: organize echo and printf. 2023-11-13 22:39:41 -06:00
Luis Guzmán 079ddfde03 changelog: bump v7.3.0 2023-11-11 21:19:26 -06:00
Luis Guzmán de6217c74d v7.3.0 add excalidraw support, and other fixes. 2023-11-11 16:22:49 -06:00
Luis Guzmán 9776c5e034 remove name by request 2023-11-11 16:22:16 -06:00
Luis Guzmán 725bc8dda7 remove .github folder 2023-11-11 16:22:16 -06:00
Luis Guzmán 256c85a250 add test_match function and fix spacing. 2023-11-11 16:22:16 -06:00
Luis Guzmán 807fcd52df update copyright and reference note. 2023-11-11 16:22:16 -06:00
Luis Guzmán 8b6c071d47 Improve style and comments 2023-11-11 16:22:16 -06:00
Luis Guzmán a2a5c590b0 Fix small typo 2023-11-11 16:22:16 -06:00
Luis Guzmán 86e39afa5c excalidraw-backend.sh: fix test possition and make varibale absolute path. 2023-11-11 16:22:16 -06:00
Luis Guzmán 5c7dfb9984 quick_jibri_installer.sh: update features list. 2023-11-11 16:22:16 -06:00
Luis Guzmán 20e1f7b362 quick_jibri_installer.sh: add excalidraw whiteboard backend
disable jigasi selector and checks
2023-11-11 16:22:16 -06:00
Luis Guzmán d1f3009844 excalibur: keep same naming convention 2023-11-11 16:22:16 -06:00
Luis Guzmán 7de6201af6 excalibur: minor shell fixes. 2023-11-11 16:22:16 -06:00
Luis Guzmán 5ac6c8269a excalibur: add installer for whiteboard feature. 2023-11-11 16:22:16 -06:00
Luis Guzmán a5c8f2f93f misc: update year to late 2023. 2023-11-11 16:22:16 -06:00
Luis Guzmán 390aa1bc0b misc: update repository address to new home. 2023-11-11 16:22:16 -06:00
Luis Guzmán 5226133ce7 changelog: update previous version. 2023-11-11 16:21:19 -06:00
Luis Guzmán 43ec159b71 jra_nextcloud.sh: organize functions, add apt checks, higher password lenght and small fixes. 2023-11-11 16:17:52 -06:00
Luis Guzmán 1753a5a401 fix conflicts 2023-11-11 16:16:04 -06:00
Luis Guzmán c633c11149 jra_nextcloud.sh: fix key agregation and variable collection. 2023-11-11 16:13:35 -06:00
Luis Guzmán 1bd3f86cc4 bump version 7.0.8 2023-11-11 16:03:40 -06:00
Luis Guzmán 4bc234b6bd v7.2.1
bump 7.2.1 release
2023-10-22 17:06:30 -06:00
Luis Guzmán 9bd5916f24 quick_jibri_installer.sh: fix deprecated nodejs repo setup
add printwc function
2023-10-22 16:09:20 -06:00
Luis Guzman c556770eda
changelog: bump 7.2.0 (#101)
* changelog: update previous version.

* changelog: bump 7.2.0
2023-08-23 01:06:08 -06:00
Luis Guzman ccec4a0ab6
v7.2 (#100)
* jitsi-updater.sh: fix check chrome driver version.

* jra_nextcloud.sh: organize functions, add apt checks, higher password length and small fixes.

* quick_jibri_installer.sh,jitsi-updater.sh: update chromedriver 115+ version download.

* quick_jibri_installer.sh: update nodejs to a stable release.

* quick_jibri_installer.sh: fix empty variable usage.

* quick_jibri_installer.sh: rearrange chromedriver variables.
2023-08-23 00:51:24 -06:00
Luis Guzman 5a143d4c25
7.1.0 (#99)
* changelog: add changelog

* quick_jibri_installer.sh: increase support to 22.04
fix key aggregation and remove deprecated letsencrypt ppa

* etherpad-docker.sh: fix key aggregation and variable collection.

* grafana.sh: fix gpg key aggregation

* jm-bm.sh: tweak sed

* jra_nextcloud.sh: fix key aggregation and variable collection.

* jra_nextcloud.sh: fix add gpg key function and add install available version package

* jra_nextcloud.sh: small fix for install_aval_package function
2023-02-22 05:56:20 -06:00
Luis Guzmán 1bfa6b90a2 bump version 7.0.8 2022-11-15 03:00:56 -06:00
Luis Guzmán 56ce1e5173 changelog: add changelog 2022-11-15 03:00:56 -06:00
Luis Guzman 2b92a67c01
Merge pull request #93 from switnet-ltd/unstable
add update checks for supported versions
2022-11-15 02:52:58 -06:00
Luis Guzmán 3c2d700866 jitsi-updater.sh: add checks for openjdk and nodejs supported versions 2022-11-15 02:14:27 -06:00
Luis Guzmán eba405ccc7 add-jibri-node.sh: set openjdk-jre-headless default version to 11 2022-11-15 02:11:08 -06:00
Luis Guzman d36f92adb7
Merge pull request #90 from switnet-ltd/unstable
quick_jibri_installer.sh: fix jaas & acme integration
2022-10-23 23:52:23 -05:00
Luis Guzmán 87092a8f0d quick_jibri_installer.sh: fix acme integration 2022-10-23 23:47:43 -05:00
Luis Guzmán 62f0aef13a quick_jibri_installer.sh: fix some readability issues. 2022-10-23 23:44:48 -05:00
Luis Guzmán c14bca2b3f quick_jibri_installer.sh: Decline JaaS ofering by default. 2022-10-23 22:43:33 -05:00
Luis Guzman 9ab18fc892
7.0.6 (#88)
* jitsi-updater.sh: fix jitsi repo package update filtering.
2022-09-30 04:04:31 -05:00
Luis Guzmán f5ebfd0e8e jitsi-updater.sh: fix jitsi repo package update filtering. 2022-09-30 04:00:42 -05:00
Luis Guzmán 1e8c128c9d jitsi-updater.sh: fix jitsi repo package update filtering. 2022-09-30 03:57:55 -05:00
Luis Guzmán a61b60ff16 jm-bm.sh: update recordd icon 2022-08-19 07:45:59 -05:00
Luis Guzman 658bb07fdd
7.0.5 (#86)
* quick_jibri_installer.sh: use new setup to enable local recording feature.
2022-08-19 07:23:41 -05:00
Luis Guzmán 813083692c quick_jibri_installer.sh: use new setup to enable localrecording feature. 2022-08-19 07:20:44 -05:00
Luis Guzman 03251bd043
7.0.4 (#85)
* quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup.
  -fix small format issues.
2022-08-19 06:47:21 -05:00
Luis Guzmán 84af61598f quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup.
fix small format issues.
2022-08-19 06:35:49 -05:00
Luis Guzman 8b20ae561c
7.0.3 (#83)
* jitsi-updater: fix condition to set turn config.

* quick-jibri-installer: fix typo on path.
2022-06-30 09:57:12 -05:00
Luis Guzmán d2519be977 quick-jibri-installer: fix typo on path. 2022-06-23 12:45:38 -05:00
Luis Guzmán 7e37382c4d jitsi-updater: fix condition to set turn config. 2022-06-23 12:44:26 -05:00
Luis Guzman 9926e5d573
7.0.2 (#82)
* Detect jibri node by jitsi-updater.
2022-06-17 16:36:15 -05:00
Luis Guzmán d0dc74eecc Merge branch 'unstable' of github.com:switnet-ltd/quick-jibri-installer into unstable 2022-06-17 16:30:45 -05:00
Luis Guzmán 48e798d0b1 Detect jibri node by jitsi-updater. 2022-06-17 16:30:30 -05:00
Luis Guzman 869df7ceef
7.0.1 (#81)
* Fix debug mode on triggered scripts.

* Fix grep condition.
2022-05-23 23:17:39 -05:00
Luis Guzman 7a6cc9280e
Merge branch 'master' into unstable 2022-05-23 23:15:18 -05:00
Luis Guzmán b63021a76d Fix debug mode on triggered scripts.
Fix grep condition.
2022-05-23 23:06:58 -05:00
Luis Guzmán 546fe2587f Update SwITNet copyright.
Standarize debug option for scripts.
2022-05-20 19:54:27 -05:00
Luis Guzmán 58a663925f Improve shell quality 2022-05-20 19:29:04 -05:00
Luis Guzmán fb24f69ec7 Add comment on debconf state 2022-05-20 18:22:46 -05:00
Luis Guzmán f31bcbf57d Finally remove jigasi deprecated script. 2022-05-20 18:21:28 -05:00
Luis Guzmán 3a9e9d18f4 Standarize jra_nextcloud 2022-05-20 18:20:22 -05:00
Luis Guzmán 78bc49e5c9 Fix grafana configuration 2022-05-20 18:14:00 -05:00
Luis Guzmán e801fdd6ba Fix jibri domain. 2022-05-20 12:25:56 -05:00
Luis Guzmán 16458ee32a Yet again more fixes on echo and printf 2022-05-20 10:43:34 -05:00
Luis Guzmán 0fd5e8b8cc Set warning instead of "note". 2022-05-20 08:03:48 -05:00
Luis Guzmán 6cf2ca8f92 Remove unused code 2022-05-20 08:03:13 -05:00
Luis Guzmán 4f9bbdf748 Several indenting changes 2022-05-20 07:00:57 -05:00
Luis Guzmán cb801eafd1 Change email possition, and small fixes 2022-05-20 06:07:18 -05:00
Luis Guzmán 7ae9820889 Rename and fix set_once function. 2022-05-20 05:52:39 -05:00
Luis Guzmán bb27ee3b65 Make warning visible. 2022-05-20 05:48:03 -05:00
Luis Guzmán 6eab2c63fd Change jdk version to 11 2022-05-12 04:12:13 -05:00
Luis Guzman 4298e209f4
Merge branch 'master' into unstable 2022-05-12 00:20:40 -05:00
Luis Guzmán 7123e5d218 Remove old 2022-05-11 23:57:35 -05:00
Luis Guzmán c00d8a9efd Rename deprecated scripts folder 2022-05-11 23:56:14 -05:00
Luis Guzmán ae55dfb873 Comply main scripts with shellcheck recommendations. 2022-05-11 23:53:51 -05:00
Luis Guzmán 1875cf5db5 Comply tools section with shellcheck recommendations. 2022-05-11 23:52:44 -05:00
Luis Guzmán ced6574cfa Comply mode section with shellcheck recommendations. 2022-05-11 23:52:18 -05:00
Luis Guzmán ef5374f68c Actually apply changes to nginx conf instead of symlink. 2022-04-12 23:11:59 -05:00
Luis Guzmán 6c071098d5 Improve comments. 2022-04-07 03:01:08 -05:00
Luis Guzmán 3acc41dc7f Actually require to run with admin rights. 2022-04-07 02:55:00 -05:00
Luis Guzmán 7d162f8ade Require to run with sudo. 2022-04-07 02:52:08 -05:00
Luis Guzmán 14fceeec6b Add tool for grub setup. 2022-04-07 02:50:22 -05:00
Luis Guzmán 44e9a98b76 Fix typo and increase countdown. 2022-04-07 00:29:06 -05:00
Luis Guzmán 6719c0ee70 Use the original file, instead of overwrite the symlink. 2022-04-07 00:26:36 -05:00
31 changed files with 1792 additions and 794 deletions

3
.github/FUNDING.yml vendored
View File

@ -1,3 +0,0 @@
# These are supported funding model platforms
custom: ["https://www.paypal.me/switnet", switnet.net]

View File

@ -11,7 +11,7 @@ As for our current latest release, as we have integrated more and more features,
Login into your clean server, clone git repository and run the installer,
```
git clone https://github.com/switnet-ltd/quick-jibri-installer
git clone https://forge.switnet.net/switnet/quick-jibri-installer
cd quick-jibri-installer
sudo bash quick_jibri_installer.sh
```
@ -48,7 +48,7 @@ Check more details on our wiki.
## Requirements
1. Clean VM/VPS/Server using a supported Ubuntu LTS
2. Valid domain with DNS record, **mandatory** for SSL certs via Let's Encrypt.
3. open ports for JMS interaction, [see wiki](https://github.com/switnet-ltd/quick-jibri-installer/wiki/Firewall).
3. open ports for JMS interaction, [see wiki](https://forge.switnet.net/switnet/quick-jibri-installer/wiki/Firewall).
4. Starting at 8 GB RAM / 4 Cores @ ~3.0GHz
* Adding resources as your audience or features you require, so your experience don't suffer from the lack of resources.
5. Webcam
@ -56,9 +56,8 @@ Check more details on our wiki.
### Jibri Recodings Access via Nextcloud
* Valid domain with DNS record for Nextcloud SSL.
### Jigasi Transcript (stalled)
* SIP account
* Google Cloud Account with Billing setup.
### Jigasi Transcript
* Enough disk space to run Vosk backend via docker container.
@ -73,13 +72,13 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre
* Enabled Session Recording via Jibri
* Rename Jibri folder with name room + date.
* Jibri node network.
* Automatic Jibri nodes network sync ([see more](https://github.com/switnet-ltd/quick-jibri-installer/wiki/Setup-and-Jibri-Nodes)).
* Automatic Jibri nodes network sync ([see more](https://forge.switnet.net/switnet/quick-jibri-installer/wiki/Setup-and-Jibri-Nodes)).
* JRA (Jibri Recordings Access) via Nextcloud
* Grafana Dashboard
* Etherpad via docker install
* Authentication
1. Local
2. JWT
2. JWT ([#87](https://forge.switnet.net/switnet/quick-jibri-installer/issues/87))
3. None
* Lobby Rooms
* Conference Duration
@ -90,7 +89,7 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre
* Enabled Jitsi Electron app detection server side.
* Standalone SSL Certbot/LE implementation
* Improved recurring updater
* Jigasi Transcript - Speech to Text powered by Google API (stalled)
* Jigasi Transcript - vía Vosk speech recognition toolkit.
## Tools
* Jibri Environment Tester
@ -115,8 +114,8 @@ Feel free to use our `test-jibri-env.sh` tool to find some details on your curre
## Documentation
* Please check our [wiki](https://github.com/switnet-ltd/quick-jibri-installer/wiki) for further documentation.
* Please check our [wiki](https://forge.switnet.net/switnet/quick-jibri-installer/wiki) for further documentation.
Please note: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
SwITNet Ltd © - 2022, https://switnet.net/
SwITNet Ltd © - 2024, https://switnet.net/

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Jibri Node Aggregator
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
### 0_LAST EDITION TIME STAMP ###
@ -265,7 +265,7 @@ echo "
"
apt-get -y install \
jibri \
openjdk-8-jre-headless
openjdk-11-jre-headless
echo "# Installing Google Chrome / ChromeDriver"
if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then

View File

@ -1,6 +1,6 @@
#!/bin/bash
# JVB2 Node Aggregator
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
### 0_LAST EDITION TIME STAMP ###

136
changelog Normal file
View File

@ -0,0 +1,136 @@
quick-jibri-installer (7.3.0)
* excalibur: add installer for whiteboard feature.
* quick_jibri_installer.sh: add excalidraw whiteboard backend
disable jigasi selector
add sed check test
update features list
* misc: update repository address to new home.
* misc: update year to late 2023.
-- Software, IT & Networks <info@switnet.net> Sat, 11 Nov 2023 21:18:29 -0600
quick-jibri-installer (7.2.1)
* changelog: update previous version.
* quick_jibri_installer.sh: fix deprecated nodejs repo setup,
add printwc function
-- Software, IT & Networks <info@switnet.net> Sun, 22 Oct 2023 17:00:30 -0600
quick-jibri-installer (7.2.0)
* changelog: update previous version.
* quick_jibri_installer.sh: rearrange chromedriver variables.
* quick_jibri_installer.sh: fix empty varible usage.
* quick_jibri_installer.sh: update nodejs to a stable release.
* quick_jibri_installer.sh,jitsi-updater.sh: update chromedriver 115+ version download.
* jra_nextcloud.sh: organize functions, add apt checks, higher password lenght and small fixes.
* jitsi-updater.sh: fix check chrome driver version.
-- Software, IT & Networks <info@switnet.net> Wed Aug 23 00:51:24 2023 -0600
quick-jibri-installer (7.1.0)
* changelog: add changelog
* quick_jibri_installer.sh: increase support to 22.04
fix key aggregation and remove deprecated letsencrypt ppa
* etherpad-docker.sh: fix key aggregation and variable collection.
* grafana.sh: fix gpg key aggregation
* jm-bm.sh: tweak sed
* jra_nextcloud.sh: fix key aggregation and variable collection.
* jra_nextcloud.sh: fix add gpg key function and add install available version package
* jra_nextcloud.sh: small fix for install_aval_package function
-- Software, IT & Networks <info@switnet.net> Wed Feb 22 05:56:20 2023 -0600
quick-jibri-installer (7.0.8)
* jitsi-updater.sh: add checks for openjdk and nodejs supported versions
* add-jibri-node.sh: set openjdk-jre-headless default version to 11
* changelog: add changelog
-- Software, IT & Networks <info@switnet.net> Tue Nov 15 02:56:26 2022 -0600
quick-jibri-installer (7.0.7)
* quick_jibri_installer.sh: fix jaas & acme integration
-- Software, IT & Networks <info@switnet.net> Sun Oct 23 23:52:23 2022 -0500
quick-jibri-installer (7.0.6)
* jitsi-updater.sh: fix jitsi repo package update filtering.
-- Software, IT & Networks <info@switnet.net> Fri Sep 30 04:04:31 2022 -0500
quick-jibri-installer (7.0.5)
* quick_jibri_installer.sh: use new setup to enable local recording feature.
-- Software, IT & Networks <info@switnet.net> Fri Aug 19 07:23:41 2022 -0500
quick-jibri-installer (7.0.4)
* quick_jibri_installer.sh,jwt.sh: update anonymous string on prosody setup.
-fix small format issues.
-- Software, IT & Networks <info@switnet.net> Fri Aug 19 06:47:21 2022 -0500
quick-jibri-installer (7.0.3)
* jitsi-updater: fix condition to set turn config.
* quick-jibri-installer: fix typo on path.
-- Software, IT & Networks <info@switnet.net> Thu Jun 30 09:57:12 2022 -0500
quick-jibri-installer (7.0.2)
* Detect jibri node by jitsi-updater.
-- Software, IT & Networks <info@switnet.net> Fri Jun 17 16:36:15 2022 -0500
quick-jibri-installer (7.0.1)
* Fix debug mode on triggered scripts.
* Fix grep condition.
-- Software, IT & Networks <info@switnet.net> Mon May 23 23:17:39 2022 -0500
quick-jibri-installer (7.0)
* Major rework, comply with shellcheck
## Add
* Add experimental tool for AWS grub setup.
## Fix
* Fix grafana configuration
* Actually apply changes to nginx conf instead of symlink.
* Actually require to run with admin rights.
* Improve comments.
* Rename and fix set_once function.
* Fix jibri domain.
## Improve
* Comply mode section with shellcheck recommendations.
* Comply tools section with shellcheck recommendations.
* Comply main scripts with shellcheck recommendations.
* Improve shell quality
* Change JDK version to 11
* Make warning visible.
* Change email position, and small fixes
* Several indenting changes
* Set warning instead of "note".
* Yet again more fixes on echo and printf
* Standarize jra_nextcloud
* Add comment on debconf state
* Update SwITNet copyright and standarize debug option for scripts.
## Remove
* Rename deprecated scripts folder
* Remove old
* Remove unused code
* Finally remove jigasi deprecated script.
-- Software, IT & Networks <info@switnet.net> Fri May 20 20:07:02 2022 -0500

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Etherpad Installer for Jitsi Meet
# SwITNet Ltd © - 2020, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
#
# GPLv3 or later.
@ -30,7 +30,7 @@ echo '
########################################################################
by Software, IT & Networks Ltd
'
FORGE_REPO="https://forge.switnet.net/switnet/quick-jibri-installer"
check_apt_policy() {
apt-cache policy 2>/dev/null| awk "/$1/{print \$3}" | awk -F '/' 'NR==1{print$2}'
}
@ -42,26 +42,42 @@ if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")"
apt-get -yq2 install "$1"
fi
}
# Test for matches
test_match() {
if grep -q "$1" "$2" ; then
echo "$(basename "$2") - OK..."
else
echo "$(basename "$2"), FAIL..."
echo "Please report this to $FORGE_REPO"
exit
fi
}
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)"
MEET_CONF="/etc/jitsi/meet/$DOMAIN-config.js"
WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf"
PSGVER="$(apt-cache madison postgresql|awk -F'[ +]' 'NR==1{print $3}')"
PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|awk -F'[|+]' 'NR==1{print $2}')"
ETHERPAD_DB_USER="dockerpad"
ETHERPAD_DB_NAME="etherpad"
ETHERPAD_DB_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)"
DOCKER_CE_REPO="$(check_apt_policy docker)"
WS_CONF_MATCH1="# ensure all static content can always be found first"
echo "Add Docker repo"
if [ "$DOCKER_CE_REPO" = "stable" ]; then
echo "Docker repository already installed"
else
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker-ce.list
wget -qO - https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > \
/etc/apt/sources.list.d/docker-ce.list
wget -qO - https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker-gpg-key.gpg >/dev/null
apt -q2 update
fi
read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS
# Make sure we can rely on the match strings.
printf "> Testing match strings on config files.\n"
test_match "$WS_MATCH1" "$WS_CONF"
# Install required packages
install_ifnot docker-ce
@ -104,17 +120,21 @@ if [ "$(grep -c etherpad "$WS_CONF")" != 0 ]; then
echo "> Webserver seems configured, skipping..."
elif [ -f "$WS_CONF" ]; then
echo "> Setting up webserver configuration file..."
sed -i "/# ensure all static content can always be found first/i \ \ \ \ #Etherpad block" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_buffering off;" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ }" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \\\n" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ #Etherpad block" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Upgrade \$http_upgrade;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Connection \$connection_upgrade;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_buffering off;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_redirect off;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \ \ \ \ }" "$WS_CONF"
sed -i "/$WS_CONF_MATCH1/i \\\n" "$WS_CONF"
else
echo "> No etherpad config done to server file, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues"
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues"
fi
# Configure config.js
@ -122,7 +142,7 @@ if [ "$(grep -c "etherpad_base" "$WS_CONF")" != 0 ]; then
echo -e "> $MEET_CONF seems configured, skipping...\n"
else
echo -e "> Setting etherpad domain at $MEET_CONF...\n"
sed -i "/ openSharedDocumentOnJoin:/a\ \ \ \ etherpad_base: \'https://$DOMAIN/etherpad/p/\'," "$MEET_CONF"
sed -i "s|// etherpad_base: .*|etherpad_base: \'https://$DOMAIN/etherpad/p/\',|" "$MEET_CONF"
fi
echo "> Checking nginx configuration..."
@ -133,5 +153,5 @@ if nginx -t 2>/dev/null ; then
else
echo "Please check your configuration, something may be wrong."
echo "Will not try to enable etherpad nginx configuration, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues"
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues"
fi

208
excalidraw-backend.sh Normal file
View File

@ -0,0 +1,208 @@
#!/bin/bash
# Excalidraw Jitsi Backend Installer
#
# Based on:
# - https://community.jitsi.org/t/118883
#
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
printwc() {
printf "%b$2%b" "$1" "${Color_Off}"
}
print_title() {
printwc "${Blue}" "\n#--------------------------------------------------"
printwc "${Blue}" "\n# $1"
printwc "${Blue}" "\n#--------------------------------------------------\n"
}
restart_jibri() {
if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ]
then
systemctl restart jibri
systemctl restart jibri-icewm
systemctl restart jibri-xorg
else
echo "Jibri service not installed"
fi
}
restart_services() {
systemctl restart jitsi-videobridge2
systemctl restart jicofo
restart_jibri
systemctl restart prosody
}
test_match() {
if grep -q "$1" "$2" ; then
echo "$(basename "$2") - OK..."
else
echo "$(basename "$2"), FAIL..."
echo "Please report this to https://forge.switnet.net/switnet/quick-jibri-installer"
exit
fi
}
while getopts m: option
do
case "${option}"
in
m) MODE=${OPTARG};;
\?) echo "Usage: sudo bash ./$0 [-m debug]" && exit;;
esac
done
#DEBUG
if [ "$MODE" = "debug" ]; then
set -x
fi
if ! [ "$(id -u)" = 0 ]; then
echo "You need to be root or have sudo privileges!"
exit 0
fi
clear
echo -e '\n
########################################################################
Excalidraw Jitsi Backend Installer
########################################################################
by Software, IT & Networks Ltd
\n'
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)"
WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf"
PROSODY_FILE="/etc/prosody/conf.d/$DOMAIN.cfg.lua"
MEET_CONF="/etc/jitsi/meet/$DOMAIN-config.js"
WS_MATCH1='# ensure all static content can always be found first'
PROS_MATCH1='"av_moderation";'
PROS_MATCH2='breakout_rooms_muc = "breakout.'
PROS_MATCH3='VirtualHost "recorder.'
CONFIG_MATCH1='List of undocumented settings used in jitsi-meet'
EXCALIDRAW_HOME="/opt/excalidraw"
EXCAL_MATCH1="prometheus.metrics(io"
EXCAL_NEW_PORT="9091"
EXCAL_PORT_FILE="$EXCALIDRAW_HOME/backend/src/index.ts"
# Make sure we can rely on the match strings.
printf "Testing match strings on config files.\n"
test_match "$WS_MATCH1" "$WS_CONF"
test_match "$PROS_MATCH1" "$PROSODY_FILE"
test_match "$PROS_MATCH2" "$PROSODY_FILE"
test_match "$PROS_MATCH3" "$PROSODY_FILE"
test_match "$PROS_MATCH3" "$PROSODY_FILE"
test_match "$CONFIG_MATCH1" "$MEET_CONF"
#--------------------------------------------------
print_title "Setup excalidraw backend."
#--------------------------------------------------
adduser --home "$EXCALIDRAW_HOME" --disabled-password --gecos "" excalidraw
git clone https://github.com/jitsi/excalidraw-backend "$EXCALIDRAW_HOME/backend"
test_match "$EXCAL_MATCH1" "$EXCAL_PORT_FILE"
chown -R excalidraw:excalidraw "$EXCALIDRAW_HOME"
cd "$EXCALIDRAW_HOME/backend"
sudo -u excalidraw cp .env.development .env.production
# Use documented port to get some sort of standarization.
if sed -n "/$EXCAL_MATCH1/,/});/p" "$EXCAL_PORT_FILE" |grep -q port: ; then
echo -e "> Update predefined port for metrics to $EXCAL_NEW_PORT\n"
sed -i "/$EXCAL_MATCH1/,/});/s|port:.*,|port: $EXCAL_NEW_PORT,|" "$EXCAL_PORT_FILE"
else
echo -e "> Define new port from default to $EXCAL_NEW_PORT\n"
sed -i "/$EXCAL_MATCH1/a \ \ \ \ port: $EXCAL_NEW_PORT," "$EXCAL_PORT_FILE"
fi
printf "Installing npm backend.\n"
sudo -u excalidraw npm install
sudo -u excalidraw npm run build
#--------------------------------------------------
print_title "Setup system & jitsi config files."
#--------------------------------------------------
# Enable websocket on nginx
sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ location = /socket.io/ {" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http://127.0.0.1:3002/socket.io/?\$args;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Upgrade \$http_upgrade;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Connection \"upgrade\";" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Host \$http_host;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ tcp_nodelay on;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF"
sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF"
if grep -rq room_metadata /etc/prosody/conf.d/ ;then
echo "> Prosody seems to be already configured."
else
echo "> Setting up prosody for whiteboard..."
# Modules enabled
sed -i "/$PROS_MATCH1/a \ \ \ \ \ \ \ \ \"room_metadata\";" "$PROSODY_FILE"
# Define internal component
sed -i "/$PROS_MATCH2/a \ \ \ \ room_metadata_component = \"metadata.$DOMAIN\"" "$PROSODY_FILE"
# Register component
sed -i "/$PROS_MATCH3/i \\\n" "$PROSODY_FILE"
sed -i "/$PROS_MATCH3/i Component \"metadata.$DOMAIN\" \"room_metadata_component\"" "$PROSODY_FILE"
sed -i "/$PROS_MATCH3/i \ \ \ \ muc_component = \"conference.$DOMAIN\"" "$PROSODY_FILE"
sed -i "/$PROS_MATCH3/i \ \ \ \ breakout_rooms_component = \"breakout.$DOMAIN\"" "$PROSODY_FILE"
sed -i "/$PROS_MATCH3/i \\\n" "$PROSODY_FILE"
fi
printf "\n# Checking for whitebord setup at %s.\n" "$(basename "$MEET_CONF")"
if [ -z "$(sed -n '/whiteboard: {/,/},/p' "$MEET_CONF")" ]; then
echo "> No present configuration on current config.js file"
sed -i "/$CONFIG_MATCH1/i \\\n" "$MEET_CONF"
sed -i "/$CONFIG_MATCH1/i \ \ \ \ whiteboard: {" "$MEET_CONF"
sed -i "/$CONFIG_MATCH1/i \ \ \ \ \ \ \ \ enabled: true," "$MEET_CONF"
sed -i "/$CONFIG_MATCH1/i \ \ \ \ \ \ \ \ collabServerBaseUrl: 'https://$DOMAIN'" "$MEET_CONF"
sed -i "/$CONFIG_MATCH1/i \ \ \ \ }," "$MEET_CONF"
sed -i "/$CONFIG_MATCH1/i \\\n" "$MEET_CONF"
else
echo "> Enabling configuration on current config.js file"
sed -i "/whiteboard: {/,/},/s|// ||" "$MEET_CONF"
sed -i "/collabServerBaseUrl:/s|'https://.*'|'https://$DOMAIN'|" "$MEET_CONF"
fi
if sed -n '/toolbarButtons: \[/,/\],/p' "$MEET_CONF" | \
grep -v '//'| grep -q whiteboard ; then
echo "> Whiteboard toolbar already enabled."
elif sed -n '/toolbarButtons: \[/,/\],/p' "$MEET_CONF" | \
grep -v '//'|grep -q toolbarButtons: ; then
echo "> Enabling whiteboard toolbar."
sed -i "/toolbarButtons:/a \ \ \ \ \ \ \ 'whiteboard'," "$MEET_CONF"
else
echo "> ToolbarButtons not customized, whiteboard should be enabled by default,"
echo " otherwise, please report to: https://forge.switnet.net/switnet/quick-jibri-installer/issues"
fi
printf "\n# Add systemd service\n"
cat << EOF > /etc/systemd/system/excalidraw.service
[Unit]
Description=Excalidraw backend
After=network-online.target
[Service]
User=excalidraw
Group=excalidraw
WorkingDirectory=$EXCALIDRAW_HOME/backend
ExecStart=npm start
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
systemctl enable excalidraw.service
systemctl start excalidraw.service
printwc "${Green}" "\nExcalidraw setup complete!\n"
restart_services

109
files/jibri.conf Normal file
View File

@ -0,0 +1,109 @@
// XMPP environment config.
jibri {
streaming {
// A list of regex patterns for allowed RTMP URLs. The RTMP URL used
// when starting a stream must match at least one of the patterns in
// this list.
rtmp-allow-list = [
// By default, all services are allowed
".*"
]
}
ffmpeg {
resolution = JIBRI_RES_CONF
}
chrome {
// The flags which will be passed to chromium when launching
flags = [
"--use-fake-ui-for-media-stream",
"--start-maximized",
"--kiosk",
"--enabled",
"--disable-infobars",
"--autoplay-policy=no-user-gesture-required",
"--ignore-certificate-errors",
"--disable-dev-shm-usage"
]
}
stats {
enable-stats-d = true
}
call-status-checks {
// If all clients have their audio and video muted and if Jibri does not
// detect any data stream (audio or video) comming in, it will stop
// recording after NO_MEDIA_TIMEOUT expires.
no-media-timeout = 30 seconds
// If all clients have their audio and video muted, Jibri consideres this
// as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires.
all-muted-timeout = 10 minutes
// When detecting if a call is empty, Jibri takes into consideration for how
// long the call has been empty already. If it has been empty for more than
// DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording.
default-call-empty-timeout = 30 seconds
}
recording {
recordings-directory = "DIR_RECORD"
finalize-script = "REC_DIR"
}
api {
xmpp {
environments = [
{
// A user-friendly name for this environment
name = "JB_NAME"
// A list of XMPP server hosts to which we'll connect
xmpp-server-hosts = [ "DOMAIN" ]
// The base XMPP domain
xmpp-domain = "DOMAIN"
// The MUC we'll join to announce our presence for
// recording and streaming services
control-muc {
domain = "internal.auth.DOMAIN"
room-name = "JibriBrewery"
nickname = "Live"
}
// The login information for the control MUC
control-login {
domain = "auth.DOMAIN"
username = "jibri"
password = "JB_AUTH_PASS"
}
// An (optional) MUC configuration where we'll
// join to announce SIP gateway services
// sip-control-muc {
// domain = "domain"
// room-name = "room-name"
// nickname = "nickname"
// }
// The login information the selenium web client will use
call-login {
domain = "recorder.DOMAIN"
username = "recorder"
password = "JB_REC_PASS"
}
// The value we'll strip from the room JID domain to derive
// the call URL
strip-from-room-domain = "conference."
// How long Jibri sessions will be allowed to last before
// they are stopped. A value of 0 allows them to go on
// indefinitely
usage-timeout = 0 hour
// Whether or not we'll automatically trust any cert on
// this XMPP domain
trust-all-xmpp-certs = true
}
]
}
}
}

177
files/nextcloud.conf Normal file
View File

@ -0,0 +1,177 @@
# Nextcloud 28 nginx - configuration
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/run/php/php_PHPVER-fpm.sock;
}
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}
server {
listen 80;
listen [::]:80;
server_name _NC_DOMAIN;
# enforce https
return 301 https://\$server_name\$request_uri;
}
server {
listen _NC_NGINX_SSL_PORT ssl http2;
listen [::]:_NC_NGINX_SSL_PORT ssl http2;
server_name _NC_DOMAIN;
# Path to the root of your installation
root _NC_PATH/;
ssl_certificate /etc/letsencrypt/live/_NC_DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/_NC_DOMAIN/privkey.pem;
# Prevent nginx HTTP Server Detection
server_tokens off;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always;
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
# Serve static files
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}

View File

@ -8,7 +8,7 @@
# by "mephisto"
#
# Igor Kerstges © - 2021
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
#
# GPLv3 or later.
@ -43,11 +43,22 @@ systemctl enable "$1"
systemctl restart "$1"
systemctl status "$1"
}
test_match() {
if grep -q "$1" "$2" ; then
echo "$(basename "$2") - OK..."
else
echo "$(basename "$2"), FAIL..."
echo "Please report this to https://forge.switnet.net/switnet/quick-jibri-installer"
exit
fi
}
MAIN_TEL="/etc/telegraf/telegraf.conf"
TEL_JIT="/etc/telegraf/telegraf.d/jitsi.conf"
GRAFANA_INI="/etc/grafana/grafana.ini"
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)"
WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf"
WS_MATCH1="# ensure all static content can always be found first"
WS_MATCH2="upstream prosody {"
GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"
# Min requirements
@ -57,27 +68,33 @@ apt-get install -y gnupg2 \
wget \
jq
# Make sure we can rely on the match strings.
printf "> Testing match strings on config files.\n"
test_match "$WS_MATCH1" "$WS_CONF"
echo "
# Setup InfluxDB Packages
"
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
curl -s https://repos.influxdata.com/influxdata-archive.key > \
/etc/apt/trusted.gpg.d/influxdata-archive.key
echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.key] https://repos.influxdata.com/debian buster stable" | \
sudo tee /etc/apt/sources.list.d/influxdb.list
apt-get update && apt-get install influxdb -y
run_service influxdb
echo "
# Setup Grafana Packages
"
curl -s https://packages.grafana.com/gpg.key | sudo apt-key add -
add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
curl -s https://apt.grafana.com/gpg-full.key | \
gpg --dearmor | tee /etc/apt/trusted.gpg.d/grafana-full-key.gpg >/dev/null
echo "deb https://packages.grafana.com/oss/deb stable main" | \
sudo tee /etc/apt/sources.list.d/grafana_com_oss_deb.list
apt-get update && apt-get install grafana -y
run_service grafana-server
echo "
# Setup Telegraf Packages
"
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt-get update && apt-get install telegraf -y
mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.original
@ -134,16 +151,18 @@ JITSI_TELEGRAF
run_service telegraf
echo -n "\n# Setup videobridge options\n"
echo -e "\n# Setup videobridge options\n"
echo '
# extra options to pass to the JVB daemon
JVB_OPTS="--apis=rest,xmpp"' >> /etc/jitsi/videobridge/config
sed -i "s|TRANSPORT=muc|TRANSPORT=muc,colibri|" /etc/jitsi/videobridge/sip-communicator.properties
# Enable videobridge REST API
hocon -f /etc/jitsi/videobridge/jvb.conf set videobridge.apis.rest.enabled true
systemctl restart jitsi-videobridge2
echo -e "\n# Setup Grafana nginx domain\n"
sed -i "s|;protocol =.*|protocol = http|" $GRAFANA_INI
sed -i "s|;http_addr =.*|http_addr = localhost|" $GRAFANA_INI
sed -i "s|;http_addr =.*|http_addr = 127.0.0.1|" $GRAFANA_INI
sed -i "s|;http_port =.*|http_port = 3000|" $GRAFANA_INI
sed -i "s|;domain =.*|domain = $DOMAIN|" $GRAFANA_INI
sed -i "s|;enforce_domain =.*|enforce_domain = false|" $GRAFANA_INI
@ -161,14 +180,34 @@ while [ $secs -gt 0 ]; do
done
if [ -f "$WS_CONF" ]; then
sed -i "/# ensure all static content can always be found first/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \ \ \ \ }" "$WS_CONF"
sed -i "/# ensure all static content can always be found first/i \\\n" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana." "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ location ~ ^/(grafana/|grafana/login) {" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF"
sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana Live WebSocket connections." "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ location /grafana/api/live/ {" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Upgrade \$http_upgrade;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Connection \$connection_upgrade;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF"
sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF"
sed -i "/$WS_MATCH2/i # This is required to proxy Grafana Live WebSocket connections." "$WS_CONF"
sed -i "/$WS_MATCH2/i map \$http_upgrade \$connection_upgrade {" "$WS_CONF"
sed -i "/$WS_MATCH2/i \ \ default upgrade;" "$WS_CONF"
sed -i "/$WS_MATCH2/i \ \ '' close;" "$WS_CONF"
sed -i "/$WS_MATCH2/i }" "$WS_CONF"
sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF"
sed -i "/$WS_MATCH2/i upstream grafana {" "$WS_CONF"
sed -i "/$WS_MATCH2/i \ \ server localhost:3000;" "$WS_CONF"
sed -i "/$WS_MATCH2/i }" "$WS_CONF"
systemctl restart nginx
else
echo "No app configuration done to server file, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues"
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues"
fi
echo "
@ -180,7 +219,7 @@ PUT -H "Content-Type: application/json;charset=UTF-8" -d \
\"oldPassword\": \"admin\",
\"newPassword\": \"$GRAFANA_PASS\",
\"confirmNew\": \"$GRAFANA_PASS\"
}" http://localhost:3000/api/user/password; echo ""
}" http://127.0.0.1:3000/api/user/password; echo ""
echo "
# Create InfluxDB datasource
@ -190,16 +229,16 @@ POST -H 'Content-Type: application/json;charset=UTF-8' -d \
'{
"name": "InfluxDB",
"type": "influxdb",
"url": "http://localhost:8086",
"url": "http://127.0.0.1:8086",
"access": "proxy",
"isDefault": true,
"database": "jitsi"
}' http://localhost:3000/api/datasources; echo ""
}' http://127.0.0.1:3000/api/datasources; echo ""
echo "
# Add Grafana Dashboard
"
grafana_host="http://localhost:3000"
grafana_host="http://127.0.0.1:3000"
grafana_cred="admin:$GRAFANA_PASS"
grafana_datasource="InfluxDB"
ds=(11969);

1
images/watermark2.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>

After

Width:  |  Height:  |  Size: 100 B

128
jigasi-vosk-backend.sh Normal file
View File

@ -0,0 +1,128 @@
#!/bin/bash
# Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
#Check if user is root
if ! [ "$(id -u)" = 0 ]; then
echo "You need to be root or have sudo privileges!"
exit 0
fi
exit_if_not_installed() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" != "1" ]; then
echo " This instance doesn't have $1 installed, exiting..."
echo " If you think this is an error, please report to:
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues "
exit
fi
}
clear
echo ''
echo '########################################################################'
echo ' Jigasi Transcript addon'
echo '########################################################################'
echo ' by Software, IT & Networks Ltd'
echo ''
exit_if_not_installed jitsi-meet
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)"
JIG_TRANSC_PASWD="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 16 | head -n1)"
JIG_SIP_PROP="/etc/jitsi/jigasi/sip-communicator.properties"
export DOMAIN
export JIG_TRANSC_PASWD
apt-get -q2 update
# Disable SIP account prompt by default
echo "jigasi jigasi/sip-account string ''" | debconf-set-selections
echo "jigasi jigasi/sip-password password ''" | debconf-set-selections
echo "Installing Jigasi, SIP configuration disabled by default."
apt-get -y install gettext-base jigasi docker.io
echo "Please select a language for the VOSK transcription model:"
echo "1) Chinese"
echo "2) English"
echo "3) French"
echo "4) German"
echo "5) Hindi"
echo "6) Japanese"
echo "7) Russian"
echo "8) Spanish"
read -p "Enter the number corresponding to your language choice: " -r lang_choice
case $lang_choice in
1)
echo "You selected Chinese."
VOSK_DOCKER_MODEL="alphacep/kaldi-cn"
;;
2)
echo "You selected English."
VOSK_DOCKER_MODEL="alphacep/kaldi-en"
;;
3)
echo "You selected French."
VOSK_DOCKER_MODEL="alphacep/kaldi-fr"
;;
4)
echo "You selected German."
VOSK_DOCKER_MODEL="alphacep/kaldi-de"
;;
5)
echo "You selected Hindi."
VOSK_DOCKER_MODEL="alphacep/kaldi-hi"
;;
6)
echo "You selected Japanese."
VOSK_DOCKER_MODEL="alphacep/kaldi-ja"
;;
7)
echo "You selected Russian."
VOSK_DOCKER_MODEL="alphacep/kaldi-ru"
;;
8)
echo "You selected Spanish."
VOSK_DOCKER_MODEL="alphacep/kaldi-es"
;;
*)
echo "Invalid selection. Please choose a number between 1 and 8."
;;
esac
# Running selected VOSK docker model.
docker run -d --restart always -p 2700:2700 ${VOSK_DOCKER_MODEL}:latest
echo "Setting up Jigasi transcript with current platform..."
# Jitsi Meet
echo "> Patching Jitsi Meet's config.js for Transcription support."
echo " Read more at patches/jigasi/001-jigasi-meet-config.patch file"
envsubst < patches/jigasi/001-jigasi-meet-config.patch | \
patch --no-backup-if-mismatch -d / -p1
# Jigasi
echo "> Patching jigasi's sip-communicator.properties configuration."
echo " Read more at patches/jigasi/002-jigasi-sip-properties.patch file"
cp "$JIG_SIP_PROP" ${JIG_SIP_PROP}-dpkg-file
envsubst < patches/jigasi/002-jigasi-sip-properties.patch | \
patch --no-backup-if-mismatch -d / -p1
# Create transcribe user on hidden domain.
prosodyctl register transcriber recorder."$DOMAIN" "$JIG_TRANSC_PASWD"
# Restart services.
systemctl restart prosody \
jicofo \
jigasi \
jibri* \
jitsi-videobridge2
echo ""
echo "Full transcript files are available at:"
echo "--> /var/lib/jigasi/transcripts/"
echo ""
echo "Happy transcripting!"
echo ""

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Jitsi Meet recurring upgrader and customization keeper
# for Debian/*buntu binaries.
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option
@ -20,6 +20,7 @@ fi
Blue='\e[0;34m'
Purple='\e[0;35m'
Red='\e[0;31m'
Green='\e[0;32m'
Yellow='\e[0;33m'
Color_Off='\e[0m'
@ -39,11 +40,20 @@ fi
support="https://switnet.net/support"
apt_repo="/etc/apt/sources.list.d"
ENABLE_BLESSM="TBD"
CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
CHD_LTST_2D="$(echo "$CHD_LTST"|cut -d "." -f 1,2)"
G_CHROME=$(apt-cache madison google-chrome-stable|awk '{print$3}'|cut -d. -f1-3)
CHROMELAB_URL="https://googlechromelabs.github.io/chrome-for-testing"
CHD_LTST_DWNL=$(curl -s $CHROMELAB_URL/known-good-versions-with-downloads.json | \
jq -r ".versions[].downloads.chromedriver | select(. != null) | .[].url" | \
grep linux64 | grep "$G_CHROME" | tail -1)
CHD_LTST=$(awk -F '/' '{print$7}' <<< "$CHD_LTST_DWNL")
CHD_LTST_2D="$(cut -d "." -f 1,2 <<< "$CHD_LTST")"
CHDB="$(whereis chromedriver | awk '{print$2}')"
if [ -d /etc/prosody/conf.d/ ]; then
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua | \
awk -F'.cfg' '!/localhost/{print $1}' | xargs basename)"
else
echo -e "Seems no prosody is installed...\n > is this a jibri node?"
fi
NC_DOMAIN="TBD"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
if [ -f "$JITSI_MEET_PROXY" ];then
@ -51,27 +61,26 @@ PREAD_PROXY="$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -
fi
INT_CONF="/usr/share/jitsi-meet/interface_config.js"
INT_CONF_ETC="/etc/jitsi/meet/$DOMAIN-interface_config.js"
read -r -a jibri_packages < <(grep Package /var/lib/apt/lists/download.jitsi.org_*_Packages | \
read -r -a jibri_packages < <(grep ^Package /var/lib/apt/lists/download.jitsi.org_*_Packages | \
sort -u | awk '{print $2}' | sed '/jigasi/d' | \
xargs)
AVATAR="$(grep -r avatar /etc/nginx/sites-*/ 2>/dev/null)"
if [ -f "$apt_repo"/google-chrome.list ]; then
read -r -a google_package < <(grep Package /var/lib/apt/lists/dl.google.com_*_Packages | \
read -r -a google_package < <(grep ^Package /var/lib/apt/lists/dl.google.com_*_Packages | \
sort -u | awk '{print $2}' | xargs)
else
echo "Seems no Google repo installed"
fi
if [ -z "$CHDB" ]; then
echo "Seems no chromedriver installed"
if [ -f "$apt_repo"/nodesource.list ]; then
read -r -a nodejs_package < <(grep ^Package /var/lib/apt/lists/deb.nodesource.com_node*_Packages | \
sort -u | awk '{print $2}' | xargs)
else
CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')"
CHD_VER_2D="$(echo "$CHD_VER_LOCAL"|awk '{printf "%.1f\n", $NF}')"
echo "Seems no nodejs repo installed"
fi
# True if $1 is greater than $2
version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
check_jibri() {
restart_jibri() {
if [ "$(dpkg-query -W -f='${Status}' "jibri" 2>/dev/null | grep -c "ok installed")" == "1" ]
then
systemctl restart jibri
@ -86,7 +95,7 @@ fi
restart_services() {
systemctl restart jitsi-videobridge2
systemctl restart jicofo
check_jibri
restart_jibri
systemctl restart prosody
}
@ -104,15 +113,37 @@ update_google_repo() {
else
echo "No Google repository found"
fi
if [ -z "$CHDB" ]; then
echo "Seems no chromedriver installed"
else
CHD_VER_LOCAL="$($CHDB -v | awk '{print $2}')"
CHD_VER_2D="$(awk '{printf "%.1f\n", $NF}' <<< "$CHD_VER_LOCAL")"
fi
}
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
update_nodejs_repo() {
apt-get update -o Dir::Etc::sourcelist="sources.list.d/nodesource.list" \
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
apt-get install -q2 --only-upgrade <<< printf "${nodejs_package[@]}"
}
check_latest_gc() {
printwc "${Purple}" "Checking for Google Chrome\n"
if [ -f /usr/bin/google-chrome ]; then
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{printf "%.1f\n", $NF}')"
else
printwc "${Yellow}" " -> Seems there is no Google Chrome installed\n"
IS_GLG_CHRM="no"
fi
}
check_latest_gc
upgrade_cd() {
if [ -n "$GOOGL_VER_2D" ]; then
check_latest_gc
if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" ; then
echo "Upgrading Chromedriver to Google Chromes version"
wget -q https://chromedriver.storage.googleapis.com/"$CHD_LTST"/chromedriver_linux64.zip \
wget -q "$CHD_LTST_DWNL" \
-O /tmp/chromedriver_linux64.zip
unzip -o /tmp/chromedriver_linux64.zip -d /usr/local/bin/
mv /usr/local/bin/chromedriver-linux64/chromedriver "$CHDB"
chown root:root "$CHDB"
chmod 0755 "$CHDB"
rm -rf /tpm/chromedriver_linux64.zip
@ -139,6 +170,7 @@ if [ -f "$CHDB" ]; then
upgrade_cd
else
printwc "${Yellow}" " -> Seems there is no Chromedriver installed\n"
IS_CHDB="no"
fi
}
@ -155,6 +187,28 @@ else
echo "Please check your repositories, something is not right."
exit 1
fi
printwc "${Blue}" "Check for supported nodejs LTS version"
if version_gt "14" "$(dpkg-query -W -f='${Version}' nodejs)"; then
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
apt-get install -yq2 nodejs
else
update_nodejs_repo
fi
check_if_installed(){
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo "1"
else
echo "0"
fi
}
check_for_jibri_node() {
if [ "$(check_if_installed jibri)" = 1 ] && \
[ "$(check_if_installed jitsi-meet)" = 0 ] && \
[ "$(check_if_installed prosody)" = 0 ]; then
printwc "${Green}" "\n::: This seems to be a jibri node :::\n"
JIBRI_NODE="yes"
fi
}
# Any customization, image, name or link change for any purpose should
# be documented here so new updates won't remove those changes.
# We divide them on UI changes and branding changes, feel free to adapt
@ -165,13 +219,16 @@ fi
########################################################################
# User interface changes #
########################################################################
#Check for jibri node
check_for_jibri_node
[ "$JIBRI_NODE" != yes ] && \
if [ -f "$INT_CONF_ETC" ]; then
echo "Static interface_config.js exists, skipping modification..."
else
echo "This setup doesn't have a static interface_config.js, checking changes..."
printwc "${Purple}" "========== Setting Static Avatar ==========\n"
if [[ -z "$AVATAR" ]]; then
if [ -z "$AVATAR" ]; then
echo "Moving on..."
else
echo "Setting Static Avatar"
@ -179,7 +236,7 @@ else
sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" "$INT_CONF"
fi
printwc "${Purple}" "========== Setting Support Link ==========\n"
if [[ -z "$support" ]]; then
if [ -z "$support" ]; then
echo "Moving on..."
else
echo "Setting Support custom link"
@ -188,10 +245,17 @@ else
printwc "${Purple}" "========== Disable Blur my background ==========\n"
sed -i "s|'videobackgroundblur', ||" "$INT_CONF"
fi
if [ "$(check_if_installed openjdk-8-jre-headless)" = 1 ]; then
printwc "${Red}" "\n::: Unsupported OpenJDK JRE version found :::\n"
apt-get install -y openjdk-11-jre-headless
apt-get purge -y openjdk-8-jre-headless
printwc "${Green}" "\n::: Updated to supported OpenJDK JRE version 11 :::\n"
fi
[ "$JIBRI_NODE" != yes ] && \
if [ "$NC_DOMAIN" != "TBD" ]; then
printwc "${Purple}" "========== Enable $NC_DOMAIN for sync client ==========\n"
if [ -z "$PREAD_PROXY" ]; then
if [ -f "$JITSI_MEET_PROXY" ] && [ -z "$PREAD_PROXY" ]; then
printf "\n Setting up Nextcloud domain on Jitsi Meet turn proxy\n\n"
sed -i "/server {/i \ \ map \$ssl_preread_server_name \$upstream {" "$JITSI_MEET_PROXY"
sed -i "/server {/i \ \ \ \ \ \ $DOMAIN web;" "$JITSI_MEET_PROXY"
@ -201,12 +265,31 @@ printwc "${Purple}" "========== Enable $NC_DOMAIN for sync client ==========\n"
echo "$NC_DOMAIN seems to be on place, skipping..."
fi
fi
restart_services
# Final check & upgrade call.
check_lst_cd
if [ "$JIBRI_NODE" = "yes" ]; then
restart_jibri
else
restart_services
fi
if [ "$JIBRI_NODE" = "yes" ] && \
[ "$IS_CHDB" = "no" ] && \
[ "$IS_GLG_CHRM" = "no" ];then
printwc "${Red}" "\nBeware: This jibri node seems to be missing important packages.\n"
echo " > Googe Chrome"
echo " > Chromedriver"
fi
########################################################################
# Brandless mode #
########################################################################
if [ "$ENABLE_BLESSM" = "on" ]; then
bash "$PWD"/jm-bm.sh
if [ "$MODE" = "debug" ]; then
bash "$PWD"/jm-bm.sh -m debug
else
bash "$PWD"/jm-bm.sh
fi
fi
printwc "${Blue}" "Script completed \o/!\n"

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Jitsi Meet brandless mode
# for Debian/*buntu binaries.
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option
@ -27,6 +27,7 @@ BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js"
#
JM_IMG_PATH="/usr/share/jitsi-meet/images"
WTM2_PATH="$JM_IMG_PATH/watermark2.png"
WTM2_SVG_PATH="$JM_IMG_PATH/watermark2.svg"
FICON_PATH="$JM_IMG_PATH/favicon2.ico"
REC_ICON_PATH="$JM_IMG_PATH/gnome_record.png"
#
@ -36,45 +37,50 @@ PART_USER="Participant"
LOCAL_USER="me"
#
#SEC_ROOM="TBD"
copy_if_not_there() {
if [ ! -f "$1" ]; then
cp images/"$(echo $1|xargs basename)" "$1"
else
echo "$(echo $1|xargs basename) file exists, skipping copying..."
fi
}
echo '
#--------------------------------------------------
# Applying Brandless mode
#--------------------------------------------------
'
#Watermark
if [ ! -f "$WTM2_PATH" ]; then
cp images/watermark2.png "$WTM2_PATH"
else
echo "watermark2 file exists, skipping copying..."
fi
copy_if_not_there "$WTM2_PATH"
#Watermark svg
copy_if_not_there "$WTM2_SVG_PATH"
#Favicon
if [ ! -f "$FICON_PATH" ]; then
cp images/favicon2.ico "$FICON_PATH"
else
echo "favicon2 file exists, skipping copying..."
fi
copy_if_not_there "$FICON_PATH"
#Local recording icon
if [ ! -f "$REC_ICON_PATH" ];then
cp images/gnome_record.png "$REC_ICON_PATH"
else
echo "recording icon exists, skipping copying..."
fi
copy_if_not_there "$REC_ICON_PATH"
#Custom / Remove icons
sed -i "s|watermark.png|watermark2.png|g" "$CSS_FILE"
sed -i "s|favicon.ico|favicon2.ico|g" "$TITLE_FILE"
sed -i "s|jitsilogo.png|watermark2.png|g" "$TITLE_FILE"
sed -i "s|logo-deep-linking.png|watermark2.png|g" "$BUNDLE_JS"
sed -i "s|jitsiLogo_square.png|gnome_record.png|g" "$BUNDLE_JS"
sed -i "s|icon-cloud.png|gnome_record.png|g" "$BUNDLE_JS"
#Disable logo and url
if ! grep -nr ".leftwatermark{display:none" "$CSS_FILE" ; then
if ! grep -q ".leftwatermark{display:none" "$CSS_FILE" ; then
sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE"
fi
#Replace App logo
sed -i "s|// defaultLogoUrl: .*| defaultLogoUrl: 'images/watermark2.svg',|" "$MEET_CONF"
#Overwrite favicon svg
cp images/watermark2.svg $JM_IMG_PATH/favicon.svg
#Customize room title
sed -i "s|Jitsi Meet|$APP_NAME|g" "$TITLE_FILE"
sed -i "s| powered by the Jitsi Videobridge||g" "$TITLE_FILE"
sed -i "/appNotInstalled/ s|{{app}}|$MOVILE_APP_NAME|" /usr/share/jitsi-meet/lang/*
sed -i "/appNotInstalled/ s|{{app}}|$MOVILE_APP_NAME|g" /usr/share/jitsi-meet/lang/*
#Custom UI changes
if [ -f "$INT_CONF_ETC" ]; then

View File

@ -1,6 +1,6 @@
#!/bin/bash
# JRA (Jibri Recordings Access) via Nextcloud
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option
@ -14,7 +14,7 @@ done
#DEBUG
if [ "$MODE" = "debug" ]; then
set -x
set -x
fi
if ! [ "$(id -u)" = 0 ]; then
@ -25,7 +25,7 @@ exit_if_not_installed() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" != "1" ]; then
echo " This instance doesn't have $1 installed, exiting..."
echo " If you think this is an error, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues "
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues "
exit
fi
}
@ -37,16 +37,16 @@ echo -e '\n
by Software, IT & Networks Ltd
\n'
exit_if_not_installed jitsi-meet
## APT checks
apt-get update -q2
# Manually add prerequisites.
apt-get install -y curl letsencrypt nginx
DISTRO_RELEASE="$(lsb_release -sc)"
MIN_PHP="8.2"
DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)"
PHP_REPO="$(apt-cache policy | awk '/http/&&/php/{print$2}' | awk -F "/" 'NR==1{print$5}')"
PHPVER="7.4"
PSGVER="$(apt-cache madison postgresql|awk -F'[ +]' 'NR==1{print $3}')"
PHP_FPM_DIR="/etc/php/$PHPVER/fpm"
PHP_INI="$PHP_FPM_DIR/php.ini"
PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf"
PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|awk -F'[|+]' 'NR==1{print $2}')"
NC_NGINX_SSL_PORT="$(grep "listen 44" /etc/nginx/sites-available/"$DOMAIN".conf | awk '{print$2}')"
[ -z "$NC_NGINX_SSL_PORT" ] && NC_NGINX_SSL_PORT="443"
NC_REPO="https://download.nextcloud.com/server/releases"
NCVERSION="$(curl -s -m 900 $NC_REPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)"
STABLEVERSION="nextcloud-$NCVERSION"
@ -58,13 +58,28 @@ NC_DB_PASSWD="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"
DIR_RECORD="$(awk -F '"' '/RECORDING/{print$2}' /home/jibri/finalize_recording.sh|awk 'NR==1{print$1}')"
REDIS_CONF="/etc/redis/redis.conf"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
if [ -f $JITSI_MEET_PROXY ];then
PREAD_PROXY=$(grep -nr "preread_server_name" $JITSI_MEET_PROXY | cut -d ":" -f1)
fi
PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
[ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1)
PUBLIC_IP="$(dig -4 +short myip.opendns.com @resolver1.opendns.com)"
ISO3166_CODE=TBD
NL="$(printf '\n ')"
exit_ifinstalled() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " This instance already has $1 installed, exiting..."
echo " If you think this is an error, please report to:
-> https://forge.switnet.net/switnet/quick-jibri-installer/issues "
exit
fi
}
install_ifnot() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..."
else
echo -e "\n---- Installing $1 ----"
apt-get -yq2 install "$1"
fi
}
while [[ "$ANS_NCD" != "yes" ]]
do
read -p "> Please set your domain (or subdomain) here for Nextcloud: (e.g.: cloud.domain.com)$NL" -r NC_DOMAIN
@ -80,9 +95,11 @@ do
echo " - Please try again."
fi
done
sleep .1
#Simple DNS test
if [ "$PUBLIC_IP" = "$(dig -4 +short "$NC_DOMAIN"|awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then
echo -e "Server public IP & DNS record for $NC_DOMAIN seems to match, continuing...\n\n"
sleep .1
else
echo "Server public IP ($PUBLIC_IP) & DNS record for $NC_DOMAIN don't seem to match."
echo " > Please check your dns records are applied and updated, otherwise Nextcloud may fail."
@ -94,7 +111,7 @@ else
exit
fi
fi
sleep .1
NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf"
while [ -z "$NC_USER" ]
do
@ -103,13 +120,15 @@ do
echo " - This field is mandatory."
fi
done
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]
sleep .1
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 8 ]
do
read -p "Nextcloud user password: " -r NC_PASS
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 6 ]; then
echo -e " - This field is mandatory. \nPlease make sure it's at least 6 characters.\n"
if [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 8 ]; then
echo -e " - This field is mandatory. \nPlease make sure it's at least 8 characters.\n"
fi
done
sleep .1
#Enable HSTS
while [ "$ENABLE_HSTS" != "yes" ] && [ "$ENABLE_HSTS" != "no" ]
do
@ -122,7 +141,7 @@ do
echo " - HSTS will be enabled."
fi
done
sleep .1
echo -e "#Default country phone code\n
> Starting at Nextcloud 21.x it's required to set a default country phone ISO 3166-1 alpha-2 code.\n
>>> https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements <<<\n"
@ -148,34 +167,6 @@ else
exit
fi
exit_ifinstalled() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " This instance already has $1 installed, exiting..."
echo " If you think this is an error, please report to:
-> https://github.com/switnet-ltd/quick-jibri-installer/issues "
exit
fi
}
install_ifnot() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..."
else
echo -e "\n---- Installing $1 ----"
apt-get -yq2 install "$1"
fi
}
add_php74() {
if [ "$PHP_REPO" = "php" ]; then
echo "PHP $PHPVER already installed"
apt-get -q2 update
apt-get -yq2 dist-upgrade
else
echo "# Adding Ondrej PHP $PHPVER PPA Repository"
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C
echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
apt-get update -q2
fi
}
#Prevent root folder permission issues
cp "$PWD"/files/jra-nc-app-ef.json /tmp
@ -185,240 +176,39 @@ exit_ifinstalled postgresql-"$PSGVER"
# PostgresSQL
install_ifnot postgresql-"$PSGVER"
# PHP 7.4
add_php74
apt-get install -y \
imagemagick \
php"$PHPVER"-fpm \
php"$PHPVER"-bcmath \
php"$PHPVER"-bz2 \
php"$PHPVER"-curl \
php"$PHPVER"-gd \
php"$PHPVER"-gmp \
php"$PHPVER"-imagick \
php"$PHPVER"-intl \
php"$PHPVER"-json \
php"$PHPVER"-ldap \
php"$PHPVER"-mbstring \
php"$PHPVER"-pgsql \
php"$PHPVER"-redis \
php"$PHPVER"-soap \
php"$PHPVER"-xml \
php"$PHPVER"-xmlrpc \
php"$PHPVER"-zip \
redis-server \
unzip
#System related
install_ifnot smbclient
sed -i "s|.*env\[HOSTNAME\].*|env\[HOSTNAME\] = \$HOSTNAME|" "$PHP_CONF"
sed -i "s|.*env\[PATH\].*|env\[PATH\] = /usr/local/bin:/usr/bin:/bin|" "$PHP_CONF"
sed -i "s|.*env\[TMP\].*|env\[TMP\] = /tmp|" "$PHP_CONF"
sed -i "s|.*env\[TMPDIR\].*|env\[TMPDIR\] = /tmp|" "$PHP_CONF"
sed -i "s|.*env\[TEMP\].*|env\[TEMP\] = /tmp|" "$PHP_CONF"
sed -i "s|;clear_env = no|clear_env = no|" "$PHP_CONF"
#--------------------------------------------------
# Prepare PHP
#--------------------------------------------------
echo "
Tunning PHP.ini...
"
# Change values in php.ini (increase max file size)
# max_execution_time
sed -i "s|max_execution_time =.*|max_execution_time = 3500|g" "$PHP_INI"
# max_input_time
sed -i "s|max_input_time =.*|max_input_time = 3600|g" "$PHP_INI"
# memory_limit
sed -i "s|memory_limit =.*|memory_limit = 512M|g" "$PHP_INI"
# post_max
sed -i "s|post_max_size =.*|post_max_size = 1025M|g" "$PHP_INI"
# upload_max
sed -i "s|upload_max_filesize =.*|upload_max_filesize = 1024M|g" "$PHP_INI"
phpenmod opcache
{
echo "# OPcache settings for Nextcloud"
echo "opcache.enable=1"
echo "opcache.enable_cli=1"
echo "opcache.interned_strings_buffer=8"
echo "opcache.max_accelerated_files=10000"
echo "opcache.memory_consumption=256"
echo "opcache.save_comments=1"
echo "opcache.revalidate_freq=1"
echo "opcache.validate_timestamps=1"
} >> "$PHP_INI"
systemctl restart php"$PHPVER"-fpm.service
if [ "$MODE" = "debug" ]; then
bash -x "$PWD"/tools/prepare_php.sh "$MIN_PHP"
else
bash "$PWD"/tools/prepare_php.sh "$MIN_PHP"
fi
#--------------------------------------------------
# Create DB user
#--------------------------------------------------
echo -e "\n---- Creating the PgSQL DB & User ----"
cd /tmp || return
sudo -u postgres psql <<DB
CREATE DATABASE nextcloud_db;
CREATE USER ${NC_DB_USER} WITH ENCRYPTED PASSWORD '${NC_DB_PASSWD}';
GRANT ALL PRIVILEGES ON DATABASE ${NC_DB} TO ${NC_DB_USER};
DB
echo "Done!
"
echo -e "\nDone!\n"
#nginx - configuration
cat << NC_NGINX > "$NC_NGINX_CONF"
#nextcloud config
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/run/php/php${PHPVER}-fpm.sock;
}
# Add .mjs as a file extension for javascript
sed -i "/application\/javascript/s|js.*;|js mjs;|" /etc/nginx/mime.types
server {
listen 80;
listen [::]:80;
server_name $NC_DOMAIN;
# enforce https
return 301 https://\$server_name\$request_uri;
}
# nginx conf setup.
cp files/nextcloud.conf "$NC_NGINX_CONF"
sed -i "s|_PHPVER|$MIN_PHP|g" "$NC_NGINX_CONF"
sed -i "s|_NC_DOMAIN|$NC_DOMAIN|g" "$NC_NGINX_CONF"
sed -i "s|_NC_NGINX_SSL_PORT|$NC_NGINX_SSL_PORT|g" "$NC_NGINX_CONF"
sed -i "s|_NC_PATH|$NC_PATH|g" "$NC_NGINX_CONF"
server {
listen $NC_NGINX_SSL_PORT ssl http2;
listen [::]:$NC_NGINX_SSL_PORT ssl http2;
server_name $NC_DOMAIN;
ssl_certificate /etc/letsencrypt/live/$NC_DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$NC_DOMAIN/privkey.pem;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the \`ngx_pagespeed\` module, uncomment this line to disable it.
#pagespeed off;
# HTTP response headers borrowed from Nextcloud \`.htaccess\`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# set max upload size
client_max_body_size 1024M;
fastcgi_buffers 64 4K;
# Path to the root of your installation
root $NC_PATH/;
# Specify how to handle directories -- specifying \`/index.php\$request_uri\`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# \`/updater\`, \`/ocm-provider\`, \`/ocs-provider\`), and thus
# \`try_files \$uri \$uri/ /index.php\$request_uri\`
# always provides the desired behaviour.
index index.php index.html /index.php\$request_uri;
# Rule borrowed from \`.htaccess\` to handle Microsoft DAV clients
location = / {
if ( \$http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/\$is_args\$args;
}
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Make a regex exception for \`/.well-known\` so that clients can still
# access it despite the existence of the regex rule
# \`location ~ /(\.|autotest|...)\` which would otherwise handle requests
# for \`/.well-known\`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in \`.htaccess\` that concern \`/.well-known\`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files \$uri \$uri/ =404; }
location /.well-known/pki-validation { try_files \$uri \$uri/ =404; }
# Let Nextcloud's API for \`/.well-known\` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php\$request_uri;
}
# Rules borrowed from \`.htaccess\` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:\$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends \`/index.php\`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:\$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)\$;
set \$path_info \$fastcgi_path_info;
try_files \$fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param PATH_INFO \$path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ \.(?:css|js|svg|gif)\$ {
try_files \$uri /index.php\$request_uri;
expires 6M; # Cache-Control policy borrowed from \`.htaccess\`
access_log off; # Optional: Don't log access to assets
}
location ~ \.woff2?\$ {
try_files \$uri /index.php\$request_uri;
expires 7d; # Cache-Control policy borrowed from \`.htaccess\`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from \`.htaccess\`
location /remote {
return 301 /remote.php\$request_uri;
}
location / {
try_files \$uri \$uri/ /index.php\$request_uri;
}
}
NC_NGINX
systemctl stop nginx
letsencrypt certonly --standalone --renew-by-default --agree-tos -d "$NC_DOMAIN"
if [ -f /etc/letsencrypt/live/"$NC_DOMAIN"/fullchain.pem ];then
@ -454,7 +244,7 @@ chown -R www-data:www-data "$NC_PATH"
chmod -R 755 "$NC_PATH"
echo -e "\nDatabase installation...\n"
sudo -u www-data php "$NC_PATH"/occ maintenance:install \
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ maintenance:install \
--database=pgsql \
--database-name="$NC_DB" \
--database-user="$NC_DB_USER" \
@ -466,10 +256,10 @@ echo -e "\nApply custom mods...\n"
sed -i "/datadirectory/a \ \ \'skeletondirectory\' => \'\'," "$NC_CONFIG"
sed -i "/skeletondirectory/a \ \ \'simpleSignUpLink.shown\' => false," "$NC_CONFIG"
sed -i "/simpleSignUpLink.shown/a \ \ \'knowledgebaseenabled\' => false," "$NC_CONFIG"
sed -i "s|http://localhost|http://$NC_DOMAIN|" "$NC_CONFIG"
sed -i "s|http://localhost|https://$NC_DOMAIN|" "$NC_CONFIG"
echo -e "\nAdd crontab...\n"
crontab -u www-data -l | { cat; echo "*/5 * * * * php -f $NC_PATH/cron.php"; } | crontab -u www-data -
crontab -u www-data -l | { cat; echo "*/5 * * * * php$MIN_PHP -f $NC_PATH/cron.php"; } | crontab -u www-data -
echo -e "\nAdd memcache support...\n"
sed -i "s|# unixsocket .*|unixsocket /var/run/redis/redis.sock|g" "$REDIS_CONF"
@ -495,25 +285,24 @@ sed -i "/);/i \ \ )," "$NC_CONFIG"
echo -e "Done\n"
echo -e "\nAddding & Setting up Files External App for Local storage...\n"
sudo -u www-data php "$NC_PATH"/occ app:install files_external
sudo -u www-data php "$NC_PATH"/occ app:enable files_external
sudo -u www-data php "$NC_PATH"/occ app:disable support
sudo -u www-data php "$NC_PATH"/occ files_external:import /tmp/jra-nc-app-ef.json
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ app:install files_external
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ app:enable files_external
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ app:disable support
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ files_external:import /tmp/jra-nc-app-ef.json
usermod -a -G jibri www-data
chmod -R 770 "$DIR_RECORD"
chmod -R g+s "$DIR_RECORD"
echo -e "\nFixing possible missing tables...\n\n"
echo "y"|sudo -u www-data php "$NC_PATH"/occ db:convert-filecache-bigint
sudo -u www-data php "$NC_PATH"/occ db:add-missing-indices
sudo -u www-data php "$NC_PATH"/occ db:add-missing-columns
echo "y"|sudo -u www-data php$MIN_PHP "$NC_PATH"/occ db:convert-filecache-bigint
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ db:add-missing-indices
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ db:add-missing-columns
echo -e "\nAdding trusted domain...\n"
sudo -u www-data php "$NC_PATH"/occ config:system:set trusted_domains 0 --value="$NC_DOMAIN"
sudo -u www-data php$MIN_PHP "$NC_PATH"/occ config:system:set trusted_domains 0 --value="$NC_DOMAIN"
echo -e "\nSetting JRA domain on jitsi-updater.sh\n"
cd ~/quick-jibri-installer || return
sed -i "s|NC_DOMAIN=.*|NC_DOMAIN=\"$NC_DOMAIN\"|" jitsi-updater.sh
echo -e "\nQuick Nextcloud installation complete!\n"

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Custom High Performance Jitsi conf
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option
@ -87,7 +87,7 @@ Overview:
echo "# Note: As for January 2021 Firefox can't handle correctly widescreen sizing
# on lower resolution than HD (nHD & qHD), setting as incompatible for now.
# (If you know this is no longer the case. Please report it to \
https://github.com/switnet-ltd/quick-jibri-installer/issues)
https://forge.switnet.net/switnet/quick-jibri-installer/issues)
"
#Tools to consider
@ -310,7 +310,7 @@ else
echo -e "\n Watch out!, there seems to be an issue on $MEET_CONF_HP line:
$CHECKJS_MEET_CHP
Most of the times this is due upstream changes, please report to
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
fi
CHECKJS_INT_CHP="$(esvalidate "$INT_CONF_JS_HP"| cut -d ":" -f2)"
if [ -z "$CHECKJS_INT_CHP" ]; then
@ -319,7 +319,7 @@ else
echo -e "\n Watch out!, there seems to be an issue on $INT_CONF_JS_HP line:
$CHECKJS_INT_CHP
Most of the times this is due upstream changes, please report to
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
fi
sed -i "s|$MEET_CONF|$MEET_CONF_HP|g" "$WS_CONF"

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Custom Selenium Grid-Node fro Jitsi Meet
# Pandian © - https://community.jitsi.org/u/Pandian
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option

View File

@ -2,7 +2,7 @@
# System-tune-up to remove system software restrictions on a huge load of connections.
# Be aware that hardware/infrastructure resources are the most common limiters.
#
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option

View File

@ -1,6 +1,6 @@
#!/bin/bash
# JWT Mode Setup
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option
@ -54,7 +54,7 @@ apt-get install -y jitsi-meet-tokens
#Setting up
sed -i "s|c2s_require_encryption = true|c2s_require_encryption = false|" "$PROSODY_SYS"
#-
sed -i "$SRP_STR,$SRP_END{s|authentication = \"anonymous\"|authentication = \"token\"|}" "$PROSODY_FILE"
sed -i "$SRP_STR,$SRP_END{s|authentication = \"jitsi-anonymous\"|authentication = \"token\"|}" "$PROSODY_FILE"
sed -i "s|--app_id=\"example_app_id\"|app_id=\"$APP_ID\"|" "$PROSODY_FILE"
sed -i "s|--app_secret=\"example_app_secret\"|app_secret=\"$SECRET_APP\"|" "$PROSODY_FILE"
sed -i "/app_secret/a \\\\" "$PROSODY_FILE"

View File

@ -0,0 +1,40 @@
# Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
Enable transcription on jitsi meet config.js file.
diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-config.js
index f412891..f704157 100644
--- a/etc/jitsi/meet/${DOMAIN}-config.js
+++ b/etc/jitsi/meet/${DOMAIN}-config.js
@@ -426,9 +426,9 @@ var config = {
// autoCaptionOnRecord: false,
// Transcription options.
- // transcription: {
+ transcription: {
// // Whether the feature should be enabled or not.
- // enabled: false,
+ enabled: true,
// // Translation languages.
// // Available languages can be found in
@@ -443,7 +443,7 @@ var config = {
// // detected based on the environment, e.g. if the app is opened in a chrome instance which
// // is using french as its default language then transcriptions for that participant will be in french.
// // Defaults to true.
- // useAppLanguage: true,
+ useAppLanguage: true,
// // Transcriber language. This settings will only work if "useAppLanguage"
// // is explicitly set to false.
@@ -453,7 +453,7 @@ var config = {
// // Enables automatic turning on transcribing when recording is started
// autoTranscribeOnRecord: false,
- // },
+ },
// Misc

View File

@ -0,0 +1,80 @@
# Quick Jigasi Installer with VOSK backend - *buntu (LTS) based systems.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
Modify sip-communicator.properties to run Jigasi along with VOSK Models.
diff --git a/etc/jitsi/jigasi/sip-communicator.properties b/etc/jitsi/jigasi/sip-communicator.properties
index 7a8d0f3..ae5369a 100644
--- a/etc/jitsi/jigasi/sip-communicator.properties
+++ b/etc/jitsi/jigasi/sip-communicator.properties
@@ -165,12 +165,12 @@ org.jitsi.jigasi.xmpp.acc.USE_DEFAULT_STUN_SERVER=false
# If you want jigasi to perform authenticated login instead of anonymous login
# to the XMPP server, you can set the following properties.
-# org.jitsi.jigasi.xmpp.acc.USER_ID=SOME_USER@SOME_DOMAIN
-# org.jitsi.jigasi.xmpp.acc.PASS=SOME_PASS
-# org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false
+org.jitsi.jigasi.xmpp.acc.USER_ID=transcriber@recorder.${DOMAIN}
+org.jitsi.jigasi.xmpp.acc.PASS=${JIG_TRANSC_PASWD}
+org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false
# To fix SSL/TLS required by client but not supported by server
-#org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true
+org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true
# Can be used in combination with jitsi-meet module mod_auth_jitsi-shared-secret
# To have jigasi use a random username on every call
@@ -187,7 +187,7 @@ org.jitsi.jigasi.xmpp.acc.USE_DEFAULT_STUN_SERVER=false
# Activate this property if you are using self-signed certificates or other
# type of non-trusted certicates. In this mode your service trust in the
# remote certificates always.
-# net.java.sip.communicator.service.gui.ALWAYS_TRUST_MODE_ENABLED=true
+net.java.sip.communicator.service.gui.ALWAYS_TRUST_MODE_ENABLED=true
# Enable this property to be able to shutdown gracefully jigasi using
# a rest command
@@ -196,31 +196,31 @@ org.jitsi.jigasi.xmpp.acc.USE_DEFAULT_STUN_SERVER=false
# Options regarding Transcription. Read the README for a detailed description
# about each property
-#org.jitsi.jigasi.ENABLE_TRANSCRIPTION=false
-#org.jitsi.jigasi.ENABLE_SIP=true
+org.jitsi.jigasi.ENABLE_TRANSCRIPTION=true
+org.jitsi.jigasi.ENABLE_SIP=false
# whether to use the more expensive, but better performing
# "video" model when doing transcription
# org.jitsi.jigasi.transcription.USE_VIDEO_MODEL = false
# delivering final transcript
-# org.jitsi.jigasi.transcription.DIRECTORY=/var/lib/jigasi/transcripts
-# org.jitsi.jigasi.transcription.BASE_URL=http://localhost/
-# org.jitsi.jigasi.transcription.jetty.port=-1
-# org.jitsi.jigasi.transcription.ADVERTISE_URL=false
+org.jitsi.jigasi.transcription.DIRECTORY=/var/lib/jigasi/transcripts
+org.jitsi.jigasi.transcription.BASE_URL=http://localhost/
+org.jitsi.jigasi.transcription.jetty.port=-1
+org.jitsi.jigasi.transcription.ADVERTISE_URL=false
# save formats
-# org.jitsi.jigasi.transcription.SAVE_JSON=false
-# org.jitsi.jigasi.transcription.SAVE_TXT=true
+org.jitsi.jigasi.transcription.SAVE_JSON=false
+org.jitsi.jigasi.transcription.SAVE_TXT=true
# send formats
-# org.jitsi.jigasi.transcription.SEND_JSON=true
-# org.jitsi.jigasi.transcription.SEND_TXT=false
+org.jitsi.jigasi.transcription.SEND_JSON=true
+org.jitsi.jigasi.transcription.SEND_TXT=false
# Vosk server
-# org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.VoskTranscriptionService
+org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.VoskTranscriptionService
# org.jitsi.jigasi.transcription.vosk.websocket_url={"en": "ws://localhost:2700", "fr": "ws://localhost:2710"}
-# org.jitsi.jigasi.transcription.vosk.websocket_url=ws://localhost:2700
+org.jitsi.jigasi.transcription.vosk.websocket_url=ws://localhost:2700
# Whisper live transcription server
# org.jitsi.jigasi.transcription.customService=org.jitsi.jigasi.transcription.WhisperTranscriptionService

View File

@ -0,0 +1,66 @@
# Quick Jibri Installer - *buntu (LTS) based systems.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
Patch jitsi-meet config.js to enable recording and livestreaming by default.
diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-config.js
index dcb860b..8f64c7c 100644
--- a/etc/jitsi/meet/${DOMAIN}-config.js
+++ b/etc/jitsi/meet/${DOMAIN}-config.js
@@ -343,12 +343,12 @@ var config = {
// // showPrejoinWarning: true,
// },
- // recordingService: {
+ recordingService: {
// // When integrations like dropbox are enabled only that will be shown,
// // by enabling fileRecordingsServiceEnabled, we show both the integrations
// // and the generic recording service (its configuration and storage type
// // depends on jibri configuration)
- // enabled: false,
+ enabled: true,
// // Whether to show the possibility to share file recording with other people
// // (e.g. meeting participants), based on the actual implementation
@@ -357,7 +357,7 @@ var config = {
// // Hide the warning that says we only store the recording for 24 hours.
// hideStorageWarning: false,
- // },
+ },
// DEPRECATED. Use recordingService.enabled instead.
// fileRecordingsServiceEnabled: false,
@@ -368,7 +368,7 @@ var config = {
// Local recording configuration.
// localRecording: {
// // Whether to disable local recording or not.
- // disable: false,
+ // disable: true,
// // Whether to notify all participants when a participant is recording locally.
// notifyAllParticipants: false,
@@ -378,9 +378,9 @@ var config = {
// },
// Customize the Live Streaming dialog. Can be modified for a non-YouTube provider.
- // liveStreaming: {
+ liveStreaming: {
// // Whether to enable live streaming or not.
- // enabled: false,
+ enabled: true,
// // Terms link
// termsLink: 'https://www.youtube.com/t/terms',
// // Data privacy link
@@ -388,8 +388,8 @@ var config = {
// // RegExp string that validates the stream key input field
// validatorRegExpString: '^(?:[a-zA-Z0-9]{4}(?:-(?!$)|$)){4}',
// // Documentation reference for the live streaming feature.
- // helpLink: 'https://jitsi.org/live'
- // },
+ helpLink: 'https://forge.switnet.net/switnet/quick-jibri-installer'
+ },
// DEPRECATED. Use liveStreaming.enabled instead.
// liveStreamingEnabled: false,

View File

@ -0,0 +1,31 @@
# Quick Jibri Installer - *buntu (LTS) based systems.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
Patch jitsi-meet config.js to enable/disable welcome page.
diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-config.js
index dcb860b..2094287 100644
--- a/etc/jitsi/meet/${DOMAIN}-config.js
+++ b/etc/jitsi/meet/${DOMAIN}-config.js
@@ -664,13 +664,13 @@ var config = {
// enableWelcomePage: true,
// Configs for welcome page.
- // welcomePage: {
- // // Whether to disable welcome page. In case it's disabled a random room
- // // will be joined when no room is specified.
- // disabled: false,
- // // If set, landing page will redirect to this URL.
- // customUrl: ''
- // },
+ welcomePage: {
+ // Whether to disable welcome page. In case it's disabled a random room
+ // will be joined when no room is specified.
+ disabled: ${ENABLE_WELCP_BOL},
+ // If set, landing page will redirect to this URL.
+ customUrl: ''
+ },
// Configs for the lobby screen.
// lobby: {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Automated AWS generic kernel setup for jibri.
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Simple Fail2ban configuration
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Simple Jibri conf updater
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option
@ -77,18 +77,18 @@ if [ -f "$CONF_JSON"_disabled ] && \
[ -f "$JIBRI_CONF" ] && \
[ -f "$JIBRI_CONF"-dpkg-file ]; then
echo -e "\n> This jibri config has been upgraded already, we'll exit...\n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
exit
elif [ ! -f "$CONF_JSON" ] && \
[ -f "$JIBRI_CONF" ] && \
[ -f "$JIBRI_CONF"-dpkg-file ]; then
echo -e "\n> This jibri seems to be running the latest configuration already, we'll exit...\n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
exit
elif [ -f "$CONF_JSON" ] && \
[ -f "$JIBRI_CONF" ]; then
echo -e "\n> This jibri config seems to be candidate for upgrading, we'll continue...\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
fi
#Read missing variables

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Simple Jibri resolution enhancer
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option

138
tools/prepare_php.sh Normal file
View File

@ -0,0 +1,138 @@
#!/bin/bash
# Automated PHP environment build for Nextcloud.
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
PHPVER=$1
STABLE_PHP="$(apt-cache madison php|grep -v ppa|awk -F'[:+]' 'NR==1{print $2}')"
DISTRO_RELEASE="$(lsb_release -sc)"
PHP_REPO="$(apt-cache policy | awk '/http/&&/php/{print$2}' | awk -F "/" 'NR==1{print$5}')"
PHP_REPO_URL="http://ppa.launchpad.net/ondrej/php/ubuntu"
PHP_FPM_DIR="/etc/php/$PHPVER/fpm"
PHP_INI="$PHP_FPM_DIR/php.ini"
PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf"
TMP_GPG_REPO="$(mktemp -d)"
if [ $# -ne 1 ]; then
echo "Usage: $0 8.2"
exit 1
fi
install_ifnot() {
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo " $1 is installed, skipping..."
else
printf "\n---- Installing %s ----" "$1"
apt-get -yq2 install "$1"
fi
}
install_aval_package() {
for i in $1
do
if [ -z "$(apt-cache madison "$i" 2>/dev/null)" ]; then
echo " > Package $i not available on repo."
else
echo " > Add package $i to the install list"
packages="$packages $i"
fi
done
echo "$packages"
apt-get -y install $packages #< don't quote.
packages=""
}
add_gpg_keyring() {
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com "$1"
apt-key export "$1" | gpg --dearmour | tee "$TMP_GPG_REPO"/"$1".gpg >/dev/null
apt-key del "$1"
mv "$TMP_GPG_REPO"/"$1".gpg /etc/apt/trusted.gpg.d/
}
add_php_repo() {
if [ "$PHP_REPO" = "php" ]; then
echo "PHP $PHPVER already installed"
apt-get -q2 update
apt-get -yq2 dist-upgrade
else
echo "# Adding Ondrej PHP $PHPVER PPA Repository"
add_gpg_keyring E5267A6C
echo "deb [arch=amd64] $PHP_REPO_URL $DISTRO_RELEASE main" | \
tee /etc/apt/sources.list.d/php"$PHPVER".list
apt-get update -q2
fi
}
add_php_repo
install_aval_package " \
imagemagick \
php$PHPVER-fpm \
php$PHPVER-bcmath \
php$PHPVER-bz2 \
php$PHPVER-cli \
php$PHPVER-cgi \
php$PHPVER-curl \
php$PHPVER-gd \
php$PHPVER-gmp \
php$PHPVER-imagick \
php$PHPVER-intl \
php$PHPVER-json \
php$PHPVER-ldap \
php$PHPVER-mbstring \
php$PHPVER-pgsql \
php$PHPVER-redis \
php$PHPVER-soap \
php$PHPVER-xml \
php$PHPVER-xmlrpc \
php$PHPVER-zip \
redis-server \
unzip \
"
#System related
install_ifnot smbclient
sed -i "s|.*env\[HOSTNAME\].*|env\[HOSTNAME\] = \$HOSTNAME|" "$PHP_CONF"
sed -i "s|.*env\[PATH\].*|env\[PATH\] = /usr/local/bin:/usr/bin:/bin|" "$PHP_CONF"
sed -i "s|.*env\[TMP\].*|env\[TMP\] = /tmp|" "$PHP_CONF"
sed -i "s|.*env\[TMPDIR\].*|env\[TMPDIR\] = /tmp|" "$PHP_CONF"
sed -i "s|.*env\[TEMP\].*|env\[TEMP\] = /tmp|" "$PHP_CONF"
sed -i "s|;clear_env = no|clear_env = no|" "$PHP_CONF"
echo "
Tunning PHP.ini...
"
# Change values in php.ini (increase max file size)
# max_execution_time
sed -i "s|max_execution_time =.*|max_execution_time = 3500|g" "$PHP_INI"
# max_input_time
sed -i "s|max_input_time =.*|max_input_time = 3600|g" "$PHP_INI"
# memory_limit
sed -i "s|memory_limit =.*|memory_limit = 512M|g" "$PHP_INI"
# post_max
sed -i "s|post_max_size =.*|post_max_size = 1025M|g" "$PHP_INI"
# upload_max
sed -i "s|upload_max_filesize =.*|upload_max_filesize = 1024M|g" "$PHP_INI"
phpenmod opcache
{
echo "# OPcache settings for Nextcloud"
echo "opcache.enable=1"
echo "opcache.enable_cli=1"
echo "opcache.interned_strings_buffer=8"
echo "opcache.max_accelerated_files=10000"
echo "opcache.memory_consumption=256"
echo "opcache.save_comments=1"
echo "opcache.revalidate_freq=1"
echo "opcache.validate_timestamps=1"
} >> "$PHP_INI"
update-alternatives --set php /usr/bin/php"$STABLE_PHP"
update-alternatives --set php-fpm.sock /run/php/php"$STABLE_PHP"-fpm.sock
update-alternatives --set php-cgi /usr/bin/php-cgi"$STABLE_PHP"
update-alternatives --set php-cgi-bin /usr/lib/cgi-bin/php"$STABLE_PHP"
update-alternatives --set phar /usr/bin/phar"$STABLE_PHP"
update-alternatives --set phar.phar /usr/bin/phar.phar"$STABLE_PHP"
systemctl restart php"$PHPVER"-fpm.service

View File

@ -1,6 +1,6 @@
#!/bin/bash
#Start over
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GPLv3 or later.
while getopts m: option

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Simple Jibri Env tester
# SwITNet Ltd © - 2022, https://switnet.net/
# SwITNet Ltd © - 2024, https://switnet.net/
# GNU GPLv3 or later.
while getopts m: option
@ -191,18 +191,18 @@ if [ -f "${CONF_JSON}"_disabled ] && \
[ -f "$JIBRI_CONF" ] && \
[ -f "$JIBRI_CONF"-dpkg-file ]; then
echo -e "\n> This jibri config has been upgraded already. \xE2\x9C\x94 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
T6=1
elif [ ! -f "$CONF_JSON" ] && \
[ -f "$JIBRI_CONF" ] && \
[ -f "${JIBRI_CONF}"-dpkg-file ]; then
echo -e "\n> This jibri seems to be running the latest configuration already. \xE2\x9C\x94 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
T6=1
elif [ -f "${CONF_JSON}" ] && \
[ -f "$JIBRI_CONF" ]; then
echo -e "\n> This jibri config seems to be candidate for upgrading. \xE2\x9C\x96 \nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
T6=0
fi
@ -210,11 +210,11 @@ fi
echo -e "\n#6.1 -- Check for specific Chrome flag --\n"
if [ "$(grep -c "ignore-certificate-errors" $JIBRI_CONF)" != 0 ]; then
echo -e "\n> Seems you have the \"--ignore-certificate-errors\" flag required for Chrome v88 and later. \xE2\x9C\x94 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
T6_1="0.1"
else
echo -e "\n> The jibri config may be missing the required chrome flags. \xE2\x9C\x96 \nPlease check:\n https://github.com/switnet-ltd/quick-jibri-installer/blob/master/quick_jibri_installer.sh#L820 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://github.com/switnet-ltd/quick-jibri-installer/issues\n"
echo -e "\n> The jibri config may be missing the required chrome flags. \xE2\x9C\x96 \nPlease check:\n https://forge.switnet.net/switnet/quick-jibri-installer/src/branch/master/quick_jibri_installer.sh#L870 \n\nIf you think there maybe an error on checking you current jibri configuration.\nPlease report this to \
https://forge.switnet.net/switnet/quick-jibri-installer/issues\n"
T6_1=0
fi