mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-09 01:09:16 +00:00
Compare commits
5 Commits
399484f3ee
...
9a961b9bac
Author | SHA1 | Date | |
---|---|---|---|
|
9a961b9bac | ||
|
d990541f78 | ||
|
23008bf37b | ||
|
e2b8e9a41d | ||
|
15e8858ead |
@ -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,22 +36,17 @@ 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
|
||||
systemctl stop ps5-mqtt
|
||||
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"
|
||||
|
||||
@ -58,9 +57,8 @@ 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
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
@ -24,16 +24,15 @@ $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"
|
||||
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
|
||||
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
|
||||
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"
|
||||
@ -94,8 +93,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"
|
||||
|
Loading…
Reference in New Issue
Block a user