mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Compare commits
7 Commits
9a961b9bac
...
b4df014135
Author | SHA1 | Date | |
---|---|---|---|
|
b4df014135 | ||
|
916a0459aa | ||
|
6e3eea541c | ||
|
040f2760d7 | ||
|
ee71f16347 | ||
|
480e9d3e64 | ||
|
8365af6f66 |
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: liecno
|
# Author: liecno
|
||||||
# License: MIT
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# Source: https://github.com/FunkeyFlo/ps5-mqtt/
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -18,12 +18,22 @@ $STD apt-get install -y \
|
|||||||
curl \
|
curl \
|
||||||
sudo \
|
sudo \
|
||||||
mc \
|
mc \
|
||||||
jq \
|
jq
|
||||||
nodejs \
|
|
||||||
npm
|
|
||||||
$STD npm i -g playactor
|
|
||||||
msg_ok "Installed Dependencies"
|
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"
|
msg_info "Installing PS5-MQTT"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name')
|
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
|
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_ok "Installed PS5-MQTT"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
mkdir -p /root/.config/ps5-mqtt
|
mkdir -p /opt/.config/ps5-mqtt/
|
||||||
mkdir -p /root/.config/playactor
|
mkdir -p /opt/.config/ps5-mqtt/playactor
|
||||||
cat <<EOF > /root/.config/ps5-mqtt/config.json
|
cat <<EOF > /opt/.config/ps5-mqtt/config.json
|
||||||
{
|
{
|
||||||
"mqtt": {
|
"mqtt": {
|
||||||
"host": "",
|
"host": "",
|
||||||
@ -63,7 +73,7 @@ cat <<EOF > /root/.config/ps5-mqtt/config.json
|
|||||||
|
|
||||||
"account_check_interval": 5000,
|
"account_check_interval": 5000,
|
||||||
|
|
||||||
"credentialsStoragePath": "/root/.config/ps5-mqtt/credentials.json",
|
"credentialsStoragePath": "/opt/.config/ps5-mqtt/credentials.json",
|
||||||
"frontendPort": "8645"
|
"frontendPort": "8645"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -74,7 +84,7 @@ After=syslog.target network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/ps5-mqtt/ps5-mqtt
|
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:*'"
|
Environment="DEBUG='@ha:ps5:*'"
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"categories": [
|
"categories": [
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"date_created": "2025-01-03",
|
"date_created": "2025-01-09",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
@ -32,8 +32,8 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"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"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user