mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-26 18:46:18 +00:00
Refactor handling with folders in the ps5-mqtt script
This commit is contained in:
parent
e2b8e9a41d
commit
23008bf37b
@ -42,12 +42,11 @@ function update_script() {
|
|||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
msg_info "Updating PS5-MQTT to ${RELEASE}"
|
msg_info "Updating PS5-MQTT to ${RELEASE}"
|
||||||
cd ~
|
wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz
|
||||||
wget -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz
|
|
||||||
tar zxf ${RELEASE}.tar.gz
|
|
||||||
rm -rf /opt/ps5-mqtt
|
rm -rf /opt/ps5-mqtt
|
||||||
mv ps5-mqtt-* /opt/ps5-mqtt
|
tar zxf /tmp/${RELEASE}.tar.gz -C /opt
|
||||||
rm ${RELEASE}.tar.gz
|
mv /opt/ps5-mqtt-* /opt/ps5-mqtt
|
||||||
|
rm /tmp/${RELEASE}.tar.gz
|
||||||
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
||||||
msg_ok "Updated PS5-MQTT"
|
msg_ok "Updated PS5-MQTT"
|
||||||
|
|
||||||
@ -60,7 +59,6 @@ function update_script() {
|
|||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
systemctl start ps5-mqtt
|
systemctl start ps5-mqtt
|
||||||
msg_ok "Started service"
|
msg_ok "Started service"
|
||||||
|
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
@ -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')
|
RELEASE=$(curl -s https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name')
|
||||||
|
|
||||||
msg_info "Installing PS5-MQTT"
|
msg_info "Installing PS5-MQTT"
|
||||||
wget -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
|
||||||
tar zxf ${RELEASE}.tar.gz
|
tar zxf /tmp/${RELEASE}.tar.gz -C /opt
|
||||||
mv ps5-mqtt-* /opt/ps5-mqtt
|
mv /opt/ps5-mqtt-* /opt/ps5-mqtt
|
||||||
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
||||||
cd /opt/ps5-mqtt/ps5-mqtt/
|
cd /opt/ps5-mqtt/ps5-mqtt/
|
||||||
$STD npm install
|
$STD npm install
|
||||||
@ -94,8 +94,7 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
cd /
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
rm ${RELEASE}.tar.gz
|
rm /tmp/${RELEASE}.tar.gz
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
Reference in New Issue
Block a user