From 62b9e845a84210cd5b5ba9efb529669a6ed2865a Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 16:17:25 +0100 Subject: [PATCH 01/13] Add ps5-mqtt script --- ct/ps5-mqtt.sh | 78 +++++++++++++++++++++++++ install/ps5-mqtt-install.sh | 111 ++++++++++++++++++++++++++++++++++++ json/ps5-mqtt.json | 39 +++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 ct/ps5-mqtt.sh create mode 100644 install/ps5-mqtt-install.sh create mode 100644 json/ps5-mqtt.json diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh new file mode 100644 index 00000000..80f07286 --- /dev/null +++ b/ct/ps5-mqtt.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: liecno +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/FunkeyFlo/ps5-mqtt/ + +# App Default Values +APP="PS5-MQTT" +var_tags="smarthome;automation" +var_cpu="1" +var_ram="256" +var_disk="3" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + if [[ ! -d /opt/ps5-mqtt ]]; then + msg_error "No ${APP} installation found!" + exit + fi + + RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') + + header_info + check_container_storage + check_container_resources + + if [[ "${RELEASE}" != "$(cat /opt/ps5-mqtt/cs_release)" ]]; then + msg_info "Stopping service" + systemctl stop ps5-mqtt.service + msg_ok "Stopped service" + + msg_info "Updating PS5-MQTT" + cd ~ + wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz + tar zxf ${RELEASE}.tar.gz + rm -rf /opt/ps5-mqtt + mv ps5-mqtt-* /opt/ps5-mqtt + rm ${RELEASE}.tar.gz + echo ${RELEASE} > /opt/ps5-mqtt/cs_release + msg_ok "Updated PS5-MQTT" + + msg_info "Building new PS5-MQTT version" + cd /opt/ps5-mqtt/ps5-mqtt/ + npm install &>/dev/null + npm run build &>/dev/null + msg_ok "Built new PS5-MQTT version" + + msg_info "Starting service" + systemctl start ps5-mqtt.service + msg_ok "Started service" + + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8645${CL}" \ No newline at end of file diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh new file mode 100644 index 00000000..450d9350 --- /dev/null +++ b/install/ps5-mqtt-install.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: liecno +# 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 +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl jq + +msg_info "Installing NodeJS and NPM" +$STD apt-get install -y nodejs npm +msg_ok "Installed NodeJS and NPM" + +msg_info "Installing playactor" +$STD npm i -g playactor +msg_ok "Installed playactor" + +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') + +msg_info "Installing PS5-MQTT" +wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz + +tar zxf ${RELEASE}.tar.gz + +mv ps5-mqtt-* /opt/ps5-mqtt +echo ${RELEASE} > /opt/ps5-mqtt/cs_release + +cd /opt/ps5-mqtt/ps5-mqtt/ +$STD npm install +$STD npm run build +msg_ok "Installed PS5-MQTT" + +msg_info "Creating Configuration" + +mkdir -p /root/.config/ps5-mqtt +mkdir -p /root/.config/playactor +cat < /root/.config/ps5-mqtt/config.json +{ + "mqtt": { + "host": "", + "port": "", + "user": "", + "pass": "", + "discovery_topic": "homeassistant" + }, + + "device_check_interval": 5000, + "device_discovery_interval": 60000, + "device_discovery_broadcast_address": "", + + "include_ps4_devices": false, + + "psn_accounts": [ + { + "username": "", + "npsso":"" + } + ], + + "account_check_interval": 5000, + + "credentialsStoragePath": "/root/.config/ps5-mqtt/credentials.json", + "frontendPort": "8645" +} +EOF +msg_ok "Created Configuration" + +msg_info "Creating Service" +cat </etc/systemd/system/ps5-mqtt.service +[Unit] +Description=PS5-MQTT Daemon +After=syslog.target network.target + +[Service] +WorkingDirectory=/opt/ps5-mqtt/ps5-mqtt +Environment="CONFIG_PATH=/root/.config/ps5-mqtt/config.json" +Environment="DEBUG='@ha:ps5:*'" +Restart=always +RestartSec=5 +Type=simple +ExecStart=node server/dist/index.js +KillMode=process +SyslogIdentifier=ps5-mqtt + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ps5-mqtt +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +cd / +$STD apt-get -y autoremove +$STD apt-get -y autoclean +rm ${RELEASE}.tar.gz +msg_ok "Cleaned" diff --git a/json/ps5-mqtt.json b/json/ps5-mqtt.json new file mode 100644 index 00000000..9c82f691 --- /dev/null +++ b/json/ps5-mqtt.json @@ -0,0 +1,39 @@ +{ + "name": "PS5-MQTT", + "slug": "ps5-mqtt", + "categories": [ + 3 + ], + "date_created": "2025-01-03", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8645, + "documentation": null, + "website": "https://github.com/FunkeyFlo/", + "logo": "https://github.com/FunkeyFlo/ps5-mqtt/blob/main/add-ons/ps5-mqtt/logo.png?raw=true", + "description": "Integrate your Sony Playstation 5 devices with Home Assistant using MQTT.", + "install_methods": [ + { + "type": "default", + "script": "ct/ps5-mqtt.sh", + "resources": { + "cpu": 1, + "ram": 265, + "hdd": 3, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "config file: `/root/.config/ps5-mqtt/config.json`", + "type": "info" + } + ] +} \ No newline at end of file From 447357f5620093df354e320d783fba450b432bfc Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 19:48:25 +0100 Subject: [PATCH 02/13] Update location of currently installed version for ps5-mqtt script --- ct/ps5-mqtt.sh | 4 ++-- install/ps5-mqtt-install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 80f07286..e5c7c977 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -36,7 +36,7 @@ function update_script() { check_container_storage check_container_resources - if [[ "${RELEASE}" != "$(cat /opt/ps5-mqtt/cs_release)" ]]; then + if [[ "${RELEASE}" != "$(cat /opt/ps5-mqtt_version.txt)" ]]; then msg_info "Stopping service" systemctl stop ps5-mqtt.service msg_ok "Stopped service" @@ -48,7 +48,7 @@ function update_script() { rm -rf /opt/ps5-mqtt mv ps5-mqtt-* /opt/ps5-mqtt rm ${RELEASE}.tar.gz - echo ${RELEASE} > /opt/ps5-mqtt/cs_release + echo ${RELEASE} > /opt/ps5-mqtt_version.txt msg_ok "Updated PS5-MQTT" msg_info "Building new PS5-MQTT version" diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index 450d9350..d1f31aba 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -35,7 +35,7 @@ wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.g tar zxf ${RELEASE}.tar.gz mv ps5-mqtt-* /opt/ps5-mqtt -echo ${RELEASE} > /opt/ps5-mqtt/cs_release +echo ${RELEASE} > /opt/ps5-mqtt_version.txt cd /opt/ps5-mqtt/ps5-mqtt/ $STD npm install From fc0647e5b0281f498a02440d8b839d990ef01325 Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 19:49:27 +0100 Subject: [PATCH 03/13] Add version number to update information for ps5-mqtt script --- ct/ps5-mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index e5c7c977..2dfe955f 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -41,7 +41,7 @@ function update_script() { systemctl stop ps5-mqtt.service msg_ok "Stopped service" - msg_info "Updating PS5-MQTT" + msg_info "Updating PS5-MQTT to ${RELEASE}" cd ~ wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz tar zxf ${RELEASE}.tar.gz From 69473f4ac41ef28a92690fb9f6cad1328385d4e7 Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 19:53:26 +0100 Subject: [PATCH 04/13] Reformat dependencies when installing ps5-mqtt --- install/ps5-mqtt-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index d1f31aba..561d7fc5 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -15,15 +15,15 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl jq +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + jq \ + nodejs \ + npm -msg_info "Installing NodeJS and NPM" -$STD apt-get install -y nodejs npm -msg_ok "Installed NodeJS and NPM" - -msg_info "Installing playactor" $STD npm i -g playactor -msg_ok "Installed playactor" msg_ok "Installed Dependencies" From 720d17094921fc7d78c0e0d0a3b9ba69fc59bc3b Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 19:55:25 +0100 Subject: [PATCH 05/13] Remove superfluous information messages when installing ps5-mqtt --- install/ps5-mqtt-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index 561d7fc5..fdc34c2e 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -42,7 +42,7 @@ $STD npm install $STD npm run build msg_ok "Installed PS5-MQTT" -msg_info "Creating Configuration" +msg_info "Creating Service" mkdir -p /root/.config/ps5-mqtt mkdir -p /root/.config/playactor @@ -75,9 +75,7 @@ cat < /root/.config/ps5-mqtt/config.json "frontendPort": "8645" } EOF -msg_ok "Created Configuration" -msg_info "Creating Service" cat </etc/systemd/system/ps5-mqtt.service [Unit] Description=PS5-MQTT Daemon From e82d88ff80e0f2055d0355ad881777e21de24d15 Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 20:10:53 +0100 Subject: [PATCH 06/13] Remove superfluous comment from ps5-mqtt install script --- install/ps5-mqtt-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index fdc34c2e..d17d69d7 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -5,7 +5,6 @@ # 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 From 44c9b4e59952d7132683e28fbb0583ab20417085 Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 20:18:15 +0100 Subject: [PATCH 07/13] Improve wording for the config location for the ps5-mqtt script --- json/ps5-mqtt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/ps5-mqtt.json b/json/ps5-mqtt.json index 9c82f691..4a8afcb3 100644 --- a/json/ps5-mqtt.json +++ b/json/ps5-mqtt.json @@ -32,7 +32,7 @@ }, "notes": [ { - "text": "config file: `/root/.config/ps5-mqtt/config.json`", + "text": "After installation, the MQTT endpoint must be configured. The configuration file is located within the LXC container at: `/root/.config/ps5-mqtt/config.json`", "type": "info" } ] From 664f28a4cbf003b998a8f665c970dba750378961 Mon Sep 17 00:00:00 2001 From: liecno Date: Fri, 3 Jan 2025 20:46:40 +0100 Subject: [PATCH 08/13] Remove superfluous empty lines in ps5-mqtt install script --- install/ps5-mqtt-install.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index d17d69d7..043786d9 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -21,28 +21,22 @@ $STD apt-get install -y \ jq \ nodejs \ npm - $STD npm i -g playactor - msg_ok "Installed Dependencies" RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') msg_info "Installing PS5-MQTT" wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz - tar zxf ${RELEASE}.tar.gz - mv ps5-mqtt-* /opt/ps5-mqtt echo ${RELEASE} > /opt/ps5-mqtt_version.txt - cd /opt/ps5-mqtt/ps5-mqtt/ $STD npm install $STD npm run build msg_ok "Installed PS5-MQTT" msg_info "Creating Service" - mkdir -p /root/.config/ps5-mqtt mkdir -p /root/.config/playactor cat < /root/.config/ps5-mqtt/config.json @@ -74,7 +68,6 @@ cat < /root/.config/ps5-mqtt/config.json "frontendPort": "8645" } EOF - cat </etc/systemd/system/ps5-mqtt.service [Unit] Description=PS5-MQTT Daemon From 15e8858ead766c842660e854284a2ef9fa8e4aa1 Mon Sep 17 00:00:00 2001 From: liecno Date: Sat, 4 Jan 2025 11:52:40 +0100 Subject: [PATCH 09/13] Reorder code structure for ps5-mqtt script --- ct/ps5-mqtt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 2dfe955f..568d8a4d 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -25,6 +25,10 @@ color catch_errors function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/ps5-mqtt ]]; then msg_error "No ${APP} installation found!" exit @@ -32,10 +36,6 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') - header_info - check_container_storage - check_container_resources - if [[ "${RELEASE}" != "$(cat /opt/ps5-mqtt_version.txt)" ]]; then msg_info "Stopping service" systemctl stop ps5-mqtt.service From e2b8e9a41dc547c0bfd040bb301b4528fd11f918 Mon Sep 17 00:00:00 2001 From: liecno Date: Sat, 4 Jan 2025 12:09:57 +0100 Subject: [PATCH 10/13] Remove superfluous .service string vom systemctl calls in ps5-mqtt script --- ct/ps5-mqtt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 568d8a4d..5102cd8b 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -38,7 +38,7 @@ function update_script() { if [[ "${RELEASE}" != "$(cat /opt/ps5-mqtt_version.txt)" ]]; then msg_info "Stopping service" - systemctl stop ps5-mqtt.service + systemctl stop ps5-mqtt msg_ok "Stopped service" msg_info "Updating PS5-MQTT to ${RELEASE}" @@ -58,7 +58,7 @@ function update_script() { msg_ok "Built new PS5-MQTT version" msg_info "Starting service" - systemctl start ps5-mqtt.service + systemctl start ps5-mqtt msg_ok "Started service" else From 23008bf37b0c80abca9f8bcf2ee0744277b2fbf6 Mon Sep 17 00:00:00 2001 From: liecno Date: Sat, 4 Jan 2025 12:13:12 +0100 Subject: [PATCH 11/13] Refactor handling with folders in the ps5-mqtt script --- ct/ps5-mqtt.sh | 10 ++++------ install/ps5-mqtt-install.sh | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 5102cd8b..4e75d0a5 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -42,12 +42,11 @@ function update_script() { msg_ok "Stopped service" msg_info "Updating PS5-MQTT to ${RELEASE}" - cd ~ - wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz - tar zxf ${RELEASE}.tar.gz + wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz rm -rf /opt/ps5-mqtt - mv ps5-mqtt-* /opt/ps5-mqtt - rm ${RELEASE}.tar.gz + tar zxf /tmp/${RELEASE}.tar.gz -C /opt + mv /opt/ps5-mqtt-* /opt/ps5-mqtt + rm /tmp/${RELEASE}.tar.gz echo ${RELEASE} > /opt/ps5-mqtt_version.txt msg_ok "Updated PS5-MQTT" @@ -60,7 +59,6 @@ function update_script() { msg_info "Starting service" systemctl start ps5-mqtt msg_ok "Started service" - else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index 043786d9..a07080f6 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -27,9 +27,9 @@ msg_ok "Installed Dependencies" RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') msg_info "Installing PS5-MQTT" -wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz -tar zxf ${RELEASE}.tar.gz -mv ps5-mqtt-* /opt/ps5-mqtt +wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz +tar zxf /tmp/${RELEASE}.tar.gz -C /opt +mv /opt/ps5-mqtt-* /opt/ps5-mqtt echo ${RELEASE} > /opt/ps5-mqtt_version.txt cd /opt/ps5-mqtt/ps5-mqtt/ $STD npm install @@ -94,8 +94,7 @@ motd_ssh customize msg_info "Cleaning up" -cd / $STD apt-get -y autoremove $STD apt-get -y autoclean -rm ${RELEASE}.tar.gz +rm /tmp/${RELEASE}.tar.gz msg_ok "Cleaned" From d990541f78ab6ded22bdca230c3b4547a980cc76 Mon Sep 17 00:00:00 2001 From: liecno Date: Sat, 4 Jan 2025 12:16:17 +0100 Subject: [PATCH 12/13] Reorder code in ps5-mqtt script --- install/ps5-mqtt-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index a07080f6..4edf1721 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -30,10 +30,10 @@ msg_info "Installing PS5-MQTT" wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz tar zxf /tmp/${RELEASE}.tar.gz -C /opt mv /opt/ps5-mqtt-* /opt/ps5-mqtt -echo ${RELEASE} > /opt/ps5-mqtt_version.txt cd /opt/ps5-mqtt/ps5-mqtt/ $STD npm install $STD npm run build +echo ${RELEASE} > /opt/ps5-mqtt_version.txt msg_ok "Installed PS5-MQTT" msg_info "Creating Service" From 9a961b9bacadeeae9591343f6feb9d4788c3bd3c Mon Sep 17 00:00:00 2001 From: liecno Date: Sat, 4 Jan 2025 12:44:11 +0100 Subject: [PATCH 13/13] Reorder the code for getting release version in ps5-mqtt script --- install/ps5-mqtt-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index 4edf1721..b07c0a5e 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -24,9 +24,8 @@ $STD apt-get install -y \ $STD npm i -g playactor msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') - msg_info "Installing PS5-MQTT" +RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz tar zxf /tmp/${RELEASE}.tar.gz -C /opt mv /opt/ps5-mqtt-* /opt/ps5-mqtt