From 7074bfd81e44a5eb69ad3ffc6fbe1bf2d94010b7 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:13:32 +0200 Subject: [PATCH 01/21] Added "thelounge.sh" --- ct/thelounge.sh | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 ct/thelounge.sh diff --git a/ct/thelounge.sh b/ct/thelounge.sh new file mode 100644 index 0000000000..eaad053378 --- /dev/null +++ b/ct/thelounge.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: kristocopani +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ __ + /_ __/ /_ ___ / / ____ __ ______ ____ ____ + / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ + / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ +/_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="The Lounge" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="24.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /usr/lib/systemd/system/thelounge.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "v${RELEASE}" != "$(sudo -u thelounge thelounge -v)" ]]; then + msg_info "Stopping ${APP} Services" + systemctl stop thelounge + msg_ok "Stopped ${APP} Services" + + msg_info "Updating ${APP} to ${RELEASE}" + apt-get install --only-upgrade \ + nodejs + cd /opt + wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb + apt install -y ./thelounge_${RELEASE}_all.deb + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP} Services" + systemctl daemon-reload + systemctl start thelounge + msg_ok "Started ${APP}" + + msg_info "Cleaning up" + rm -rf "/opt/thelounge_${RELEASE}_all.deb" + apt-get -y autoremove + apt-get -y autoclean + msg_ok "Cleaned" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}." +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9000${CL} \n" \ No newline at end of file From 6494592ac5bf38f2020556596232ea18baa7289a Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:13:48 +0200 Subject: [PATCH 02/21] Added "thelounge-install.sh" --- install/thelounge-install.sh | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 install/thelounge-install.sh diff --git a/install/thelounge-install.sh b/install/thelounge-install.sh new file mode 100644 index 0000000000..45acb23230 --- /dev/null +++ b/install/thelounge-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: kristocopani +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + wget +cd /opt +curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh +$STD bash nodesource_setup.sh +$STD apt-get update +$STD apt-get install -y \ + nodejs +msg_ok "Installed Dependencies" + +msg_info "Installing The Lounge" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb +$STD apt install -y ./thelounge_${RELEASE}_all.deb >/dev/null +msg_ok "Installed The Lounge" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/thelounge_${RELEASE}_all.deb" +rm -rf "/opt/nodesource_setup.sh" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From a134166a3cd5c267a2ed487fa89cdfdbb33b9e33 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:14:07 +0200 Subject: [PATCH 03/21] Added "thelounge.json" --- json/thelounge.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 json/thelounge.json diff --git a/json/thelounge.json b/json/thelounge.json new file mode 100644 index 0000000000..78dc64c719 --- /dev/null +++ b/json/thelounge.json @@ -0,0 +1,39 @@ +{ + "name": "The Lounge", + "slug": "thelounge, the-lounge", + "categories": [ + 0 + ], + "date_created": "2024-11-28", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9000, + "documentation": "https://thelounge.chat/docs", + "website": "https://thelounge.chat/", + "logo": "https://raw.githubusercontent.com/thelounge/thelounge.github.io/master/assets/logos/logo/TL_Grey%26Yellow_Vertical_logotype_Transparent_Bg/TL_Grey%26Yellow_Vertical_logotype_Transparent_Bg.png", + "description": "Modern web IRC client designed for self-hosting ", + "install_methods": [ + { + "type": "default", + "script": "/ct/thelounge, the-lounge.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 4, + "os": "Ubuntu", + "version": 24.04 + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "The Lounge is now up and running in private mode. You will have to create a user by using \"sudo -u thelounge thelounge add name\"", + "type": "info" + } + ] + } \ No newline at end of file From 19b22654d8aa8a58e16cdeec7fc295ca5b65adb8 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:16:21 +0200 Subject: [PATCH 04/21] Added empty line to end of thelounge.sh --- ct/thelounge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index eaad053378..944e091af1 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -96,4 +96,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9000${CL} \n" \ No newline at end of file + ${BL}http://${IP}:9000${CL} \n" From d2c6c06c0fbf3cd940639977bdc7eb101e6896fe Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:16:48 +0200 Subject: [PATCH 05/21] Added empty line to end of thelounge.json --- json/thelounge.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/thelounge.json b/json/thelounge.json index 78dc64c719..ac2a2c7395 100644 --- a/json/thelounge.json +++ b/json/thelounge.json @@ -36,4 +36,4 @@ "type": "info" } ] - } \ No newline at end of file + } From 1806492e346c8f8d086a4b8467d805249eb42645 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:11:16 +0200 Subject: [PATCH 06/21] Update thelounge-install.sh --- install/thelounge-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/thelounge-install.sh b/install/thelounge-install.sh index 45acb23230..dfe5e82aea 100644 --- a/install/thelounge-install.sh +++ b/install/thelounge-install.sh @@ -29,7 +29,7 @@ msg_info "Installing The Lounge" cd /opt RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb -$STD apt install -y ./thelounge_${RELEASE}_all.deb >/dev/null +$STD dpkg -i ./thelounge_${RELEASE}_all.deb msg_ok "Installed The Lounge" motd_ssh From 620a2f12eefd2a730d5d9bb8148416407e1032d0 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:20:23 +0200 Subject: [PATCH 07/21] replace apt install with dpkg -i --- ct/thelounge.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 944e091af1..951f04765b 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/misc/build.func) # Copyright (c) 2021-2024 tteck # Author: kristocopani # License: MIT @@ -70,7 +70,7 @@ function update_script() { nodejs cd /opt wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb - apt install -y ./thelounge_${RELEASE}_all.deb + dpkg -i ./thelounge_${RELEASE}_all.deb msg_ok "Updated ${APP} to ${RELEASE}" msg_info "Starting ${APP} Services" From a8332bad6fc2a5d85d8e5108ba09de77ddf9c17f Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:29:07 +0200 Subject: [PATCH 08/21] cleanup --- ct/thelounge.sh | 6 +++--- install/thelounge-install.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 951f04765b..dcff2d67e2 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/ # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ __ /_ __/ /_ ___ / / ____ __ ______ ____ ____ / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ @@ -15,7 +15,7 @@ cat <<"EOF" /_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ /____/ -EOF + EOF } header_info echo -e "Loading..." diff --git a/install/thelounge-install.sh b/install/thelounge-install.sh index dfe5e82aea..876b075b84 100644 --- a/install/thelounge-install.sh +++ b/install/thelounge-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors From 15199bc942ef2b73d0dc909bf4a854bdcb80c0a5 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:37:29 +0200 Subject: [PATCH 09/21] cleanup 2 --- ct/thelounge.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index dcff2d67e2..70475b03fe 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -4,18 +4,17 @@ source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/ # Author: kristocopani # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE - function header_info { - clear - cat <<"EOF" - ________ __ - /_ __/ /_ ___ / / ____ __ ______ ____ ____ +clear +cat <<"EOF" + ________ __ + /_ __/ /_ ___ / / ____ __ ______ ____ ____ / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ -/_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ - /____/ - - EOF +/_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ + /____/ + +EOF } header_info echo -e "Loading..." @@ -58,7 +57,10 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /usr/lib/systemd/system/thelounge.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -f /usr/lib/systemd/system/thelounge.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "v${RELEASE}" != "$(sudo -u thelounge thelounge -v)" ]]; then msg_info "Stopping ${APP} Services" @@ -84,10 +86,10 @@ function update_script() { apt-get -y autoclean msg_ok "Cleaned" msg_ok "Updated Successfully" -else - msg_ok "No update required. ${APP} is already at ${RELEASE}." -fi -exit + else + msg_ok "No update required. ${APP} is already at ${RELEASE}." + fi + exit } start From 53abf07f9c66901535d33ac1ad8b35b78cf75e10 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:39:02 +0200 Subject: [PATCH 10/21] header_info try --- ct/thelounge.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 70475b03fe..81172155a6 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -4,16 +4,16 @@ source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/ # Author: kristocopani # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + function header_info { clear cat <<"EOF" - ________ __ - /_ __/ /_ ___ / / ____ __ ______ ____ ____ - / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ - / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ -/_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ - /____/ - + ______ __ _ __ _ ____ _ _______ + /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/ + / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ + / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / +/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ + EOF } header_info From 73b56e18398e775a43b85c3c93e8a090a3342033 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:42:55 +0200 Subject: [PATCH 11/21] header_info fix1? --- ct/thelounge.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 81172155a6..28e354aba6 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -8,14 +8,15 @@ source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/ function header_info { clear cat <<"EOF" - ______ __ _ __ _ ____ _ _______ - /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/ - / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ - / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / -/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ - + ____ __ ____ __ _ __ ______ __ _________ __ + / __ \___ ____ / / / __ \___ / /_ _____(_)___/ / /_ __/___ _____________ ____ / /_ / ____/ (_)__ ____ / /_ + / /_/ / _ \/ __ `/ /___/ / / / _ \/ __ \/ ___/ / __ / / / / __ \/ ___/ ___/ _ \/ __ \/ __/ / / / / / _ \/ __ \/ __/ + / _, _/ __/ /_/ / /___/ /_/ / __/ /_/ / / / / /_/ / / / / /_/ / / / / / __/ / / / /_ / /___/ / / __/ / / / /_ +/_/ |_|\___/\__,_/_/ /_____/\___/_.___/_/ /_/\__,_/ /_/ \____/_/ /_/ \___/_/ /_/\__/ \____/_/_/\___/_/ /_/\__/ + EOF } + header_info echo -e "Loading..." APP="The Lounge" From 44fd1e58be2dbecae9d496b8e5e70650b1671028 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:47:26 +0200 Subject: [PATCH 12/21] Fix header --- ct/thelounge.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 28e354aba6..48bedf13ed 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,22 +1,21 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2024 tteck -# Author: kristocopani +# Author: tteck (tteckster) # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE function header_info { clear cat <<"EOF" - ____ __ ____ __ _ __ ______ __ _________ __ - / __ \___ ____ / / / __ \___ / /_ _____(_)___/ / /_ __/___ _____________ ____ / /_ / ____/ (_)__ ____ / /_ - / /_/ / _ \/ __ `/ /___/ / / / _ \/ __ \/ ___/ / __ / / / / __ \/ ___/ ___/ _ \/ __ \/ __/ / / / / / _ \/ __ \/ __/ - / _, _/ __/ /_/ / /___/ /_/ / __/ /_/ / / / / /_/ / / / / /_/ / / / / / __/ / / / /_ / /___/ / / __/ / / / /_ -/_/ |_|\___/\__,_/_/ /_____/\___/_.___/_/ /_/\__,_/ /_/ \____/_/ /_/ \___/_/ /_/\__/ \____/_/_/\___/_/ /_/\__/ - + ________ __ + /_ __/ /_ ___ / / ____ __ ______ ____ ____ + / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ + / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ +/_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ + /____/ EOF } - header_info echo -e "Loading..." APP="The Lounge" From 1b40a56f03afe4a179093270a318813b5cd1c3e8 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Thu, 28 Nov 2024 21:47:54 +0200 Subject: [PATCH 13/21] Test 1 --- ct/thelounge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 48bedf13ed..c317f9df70 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/misc/build.func) # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT From 238d6bcd00f1c7461107775274a3ec2a5c4b1b3e Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:58:28 +0200 Subject: [PATCH 14/21] Update thelounge.sh From c6470ff7f604c88ec8514463209de7bb72933c82 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:58:48 +0200 Subject: [PATCH 15/21] Update thelounge.sh --- ct/thelounge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index c317f9df70..120ee57741 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/misc/build.func) # Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) +# Author: kristocopani1 # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From cfe4a546d7b4d75f344068f70d692b3de4f55704 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:01:17 +0200 Subject: [PATCH 16/21] Update thelounge.sh --- ct/thelounge.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 120ee57741..78646d84fc 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2024 tteck -# Author: kristocopani1 +# Author: kristocopani # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 672ab779419fad9f93beba89ae03cb030c704e33 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:14:07 +0200 Subject: [PATCH 17/21] Update thelounge.sh --- ct/thelounge.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 78646d84fc..178ac7a8e1 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2024 community-scripts ORG # Author: kristocopani # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -13,7 +13,8 @@ cat <<"EOF" / / / __ \/ _ \ / / / __ \/ / / / __ \/ __ `/ _ \ / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ /_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ - /____/ + /____/ + EOF } header_info @@ -62,10 +63,10 @@ function update_script() { exit fi RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "v${RELEASE}" != "$(sudo -u thelounge thelounge -v)" ]]; then - msg_info "Stopping ${APP} Services" + f [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" systemctl stop thelounge - msg_ok "Stopped ${APP} Services" + msg_ok "Stopped Service" msg_info "Updating ${APP} to ${RELEASE}" apt-get install --only-upgrade \ @@ -73,12 +74,11 @@ function update_script() { cd /opt wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb dpkg -i ./thelounge_${RELEASE}_all.deb - msg_ok "Updated ${APP} to ${RELEASE}" + msg_ok "Updated ${APP} to v${RELEASE}" - msg_info "Starting ${APP} Services" - systemctl daemon-reload + msg_info "Starting Service" systemctl start thelounge - msg_ok "Started ${APP}" + msg_ok "Started Service" msg_info "Cleaning up" rm -rf "/opt/thelounge_${RELEASE}_all.deb" @@ -87,7 +87,7 @@ function update_script() { msg_ok "Cleaned" msg_ok "Updated Successfully" else - msg_ok "No update required. ${APP} is already at ${RELEASE}." + msg_ok "No update required. ${APP} is already at v${RELEASE}." fi exit } From 2efb9c6fd03ac9dc7ce12bed7a3c13af35f9d144 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:16:54 +0200 Subject: [PATCH 18/21] Update thelounge-install.sh --- install/thelounge-install.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/install/thelounge-install.sh b/install/thelounge-install.sh index 876b075b84..7575d8835c 100644 --- a/install/thelounge-install.sh +++ b/install/thelounge-install.sh @@ -16,20 +16,28 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ - wget -cd /opt -curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh -$STD bash nodesource_setup.sh -$STD apt-get update -$STD apt-get install -y \ - nodejs + wget \ + mc msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install --global yarn +msg_ok "Installed Node.js" + msg_info "Installing The Lounge" cd /opt RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb $STD dpkg -i ./thelounge_${RELEASE}_all.deb +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed The Lounge" motd_ssh @@ -37,7 +45,6 @@ customize msg_info "Cleaning up" rm -rf "/opt/thelounge_${RELEASE}_all.deb" -rm -rf "/opt/nodesource_setup.sh" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From f86ab00a18b64877918ff2a4e18ed6082b6bfa17 Mon Sep 17 00:00:00 2001 From: Kristo Copani <31226503+kristocopani@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:19:47 +0200 Subject: [PATCH 19/21] Update thelounge.json --- json/thelounge.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json/thelounge.json b/json/thelounge.json index ac2a2c7395..e90eec21a0 100644 --- a/json/thelounge.json +++ b/json/thelounge.json @@ -1,6 +1,6 @@ { "name": "The Lounge", - "slug": "thelounge, the-lounge", + "slug": "thelounge", "categories": [ 0 ], @@ -16,7 +16,7 @@ "install_methods": [ { "type": "default", - "script": "/ct/thelounge, the-lounge.sh", + "script": "/ct/thelounge.sh", "resources": { "cpu": 2, "ram": 2048, @@ -32,7 +32,7 @@ }, "notes": [ { - "text": "The Lounge is now up and running in private mode. You will have to create a user by using \"sudo -u thelounge thelounge add name\"", + "text": "The Lounge is running in private mode. Use \"sudo -u thelounge thelounge add name\" to create users.", "type": "info" } ] From 642e109083bc196e71ee94e5275448c4b9b09630 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:01:29 +0100 Subject: [PATCH 20/21] Little Fixes --- ct/thelounge.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index 178ac7a8e1..b1e740bde7 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -63,14 +63,13 @@ function update_script() { exit fi RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - f [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping Service" systemctl stop thelounge msg_ok "Stopped Service" - msg_info "Updating ${APP} to ${RELEASE}" - apt-get install --only-upgrade \ - nodejs + msg_info "Updating ${APP} to v${RELEASE}" + apt-get install --only-upgrade nodejs &>/dev/null cd /opt wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb dpkg -i ./thelounge_${RELEASE}_all.deb @@ -82,8 +81,6 @@ function update_script() { msg_info "Cleaning up" rm -rf "/opt/thelounge_${RELEASE}_all.deb" - apt-get -y autoremove - apt-get -y autoclean msg_ok "Cleaned" msg_ok "Updated Successfully" else From 066ddd1b1688571d38e0a1955c2106178286daa2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:02:55 +0100 Subject: [PATCH 21/21] Update thelounge.sh --- ct/thelounge.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/thelounge.sh b/ct/thelounge.sh index b1e740bde7..ec937701d6 100644 --- a/ct/thelounge.sh +++ b/ct/thelounge.sh @@ -14,7 +14,6 @@ cat <<"EOF" / / / / / / __/ / /___/ /_/ / /_/ / / / / /_/ / __/ /_/ /_/ /_/\___/ /_____/\____/\__,_/_/ /_/\__, /\___/ /____/ - EOF } header_info