Compare commits

...

7 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
b4df014135 Fix Date in json 2025-01-09 16:21:49 +01:00
Michel Roegl-Brunner
916a0459aa Fix npm 2025-01-09 16:21:04 +01:00
Michel Roegl-Brunner
6e3eea541c Update ps5-mqtt-install.sh 2025-01-09 16:18:11 +01:00
Michel Roegl-Brunner
040f2760d7 Update 2025-01-09 16:15:42 +01:00
Michel Roegl-Brunner
ee71f16347 Update ps5-mqtt.json 2025-01-09 16:13:09 +01:00
Michel Roegl-Brunner
480e9d3e64 Update ps5-mqtt-install.sh 2025-01-09 16:12:51 +01:00
Michel Roegl-Brunner
8365af6f66 Update ps5-mqtt-install.sh 2025-01-09 16:10:39 +01:00
2 changed files with 24 additions and 14 deletions

View File

@ -2,8 +2,8 @@
# Copyright (c) 2021-2025 community-scripts ORG
# Author: liecno
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/FunkeyFlo/ps5-mqtt/
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
@ -18,12 +18,22 @@ $STD apt-get install -y \
curl \
sudo \
mc \
jq \
nodejs \
npm
$STD npm i -g playactor
jq
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 i -g playactor
msg_ok "Installed Node.js"
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
@ -36,9 +46,9 @@ echo ${RELEASE} > /opt/ps5-mqtt_version.txt
msg_ok "Installed PS5-MQTT"
msg_info "Creating Service"
mkdir -p /root/.config/ps5-mqtt
mkdir -p /root/.config/playactor
cat <<EOF > /root/.config/ps5-mqtt/config.json
mkdir -p /opt/.config/ps5-mqtt/
mkdir -p /opt/.config/ps5-mqtt/playactor
cat <<EOF > /opt/.config/ps5-mqtt/config.json
{
"mqtt": {
"host": "",
@ -63,7 +73,7 @@ cat <<EOF > /root/.config/ps5-mqtt/config.json
"account_check_interval": 5000,
"credentialsStoragePath": "/root/.config/ps5-mqtt/credentials.json",
"credentialsStoragePath": "/opt/.config/ps5-mqtt/credentials.json",
"frontendPort": "8645"
}
EOF
@ -74,7 +84,7 @@ After=syslog.target network.target
[Service]
WorkingDirectory=/opt/ps5-mqtt/ps5-mqtt
Environment="CONFIG_PATH=/root/.config/ps5-mqtt/config.json"
Environment="CONFIG_PATH=/opt/.config/ps5-mqtt/config.json"
Environment="DEBUG='@ha:ps5:*'"
Restart=always
RestartSec=5

View File

@ -4,7 +4,7 @@
"categories": [
3
],
"date_created": "2025-01-03",
"date_created": "2025-01-09",
"type": "ct",
"updateable": true,
"privileged": false,
@ -32,7 +32,7 @@
},
"notes": [
{
"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`",
"text": "After installation, the MQTT endpoint must be configured. The configuration file is located within the LXC container at: `/opt/.config/ps5-mqtt/config.json`",
"type": "info"
}
]