From e4afafc52f4e0d09c3d54ca1d9e170fefd2f87d9 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Fri, 21 May 2021 16:23:23 -0500 Subject: [PATCH] Warn about the danger of using the installer on your every day GNU/Linux system. Add some checks to prevent unaware users, addressing #54. --- README.md | 4 +++- quick_jibri_installer.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3662609..777b5eb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ Bash installer for Jitsi Meet standalone along with Jibri on supported **Ubuntu LTS** based systems using **nginx** as default webserver. ## Usage -As for our current latest release, as we have integrated more and more features, we highly recommend to use a purpose specific-newly spawn server to host the jitsi-meet framework, making sure you stick to the requirements and recommendations as much as possible, in order to avoid issues. +As for our current latest release, as we have integrated more and more features, we highly recommend to use a **purpose specific-newly spawn server** to host the jitsi-meet framework, making sure you stick to the requirements and recommendations as much as possible, in order to avoid issues. + +**WARNING:** Please, avoid using this installer on your everyday GNU/Linux system, as this is an unsupported use and it will likely BREAK YOUR SYSTEM, so please don't. ### Main Server diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index a2cf015..e5a971c 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -248,6 +248,24 @@ So you can add a Jibri server on a instance with enough resources.\n" fi done fi + +#Check system oriented porpuse +echo "Cheking system oriented purpose...." +apt-get -yq2 update +SYSTEM_DE="$(apt-cache search "ubuntu-(desktop|mate-desktop)"|awk '{print$1}'|xargs|sed 's|$| trisquel triskel trisquel-mini|')" +SYSTEM_DE_ARRAY=( $SYSTEM_DE ) +for de in "${SYSTEM_DE_ARRAY[@]}" +do + if [ "$(dpkg-query -W -f='${Status}' $de 2>/dev/null | grep -c "ok installed")" == "1" ]; then + echo -e "\n > This instance has $de installed, exiting... +\nPlease avoid using this installer on a desktop-user oriented GNU/Linux system. + This is an unsupported use, as it will likely BREAK YOUR SYSTEM, so please don't." + exit + else + echo -e "\n > No standard desktop environment for user oriented porpuse detected, continuing..." + fi +done + #Prosody repository add_prosody_repo