mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-09 17:29:16 +00:00
Compare commits
No commits in common. "9a961b9bacadeeae9591343f6feb9d4788c3bd3c" and "399484f3ee664437415659011780cba542ca4ece" have entirely different histories.
9a961b9bac
...
399484f3ee
@ -25,10 +25,6 @@ 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
|
||||
@ -36,17 +32,22 @@ 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
|
||||
systemctl stop ps5-mqtt.service
|
||||
msg_ok "Stopped service"
|
||||
|
||||
msg_info "Updating PS5-MQTT to ${RELEASE}"
|
||||
wget -P /tmp -q https://github.com/FunkeyFlo/ps5-mqtt/archive/refs/tags/${RELEASE}.tar.gz
|
||||
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
|
||||
tar zxf /tmp/${RELEASE}.tar.gz -C /opt
|
||||
mv /opt/ps5-mqtt-* /opt/ps5-mqtt
|
||||
rm /tmp/${RELEASE}.tar.gz
|
||||
mv ps5-mqtt-* /opt/ps5-mqtt
|
||||
rm ${RELEASE}.tar.gz
|
||||
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
||||
msg_ok "Updated PS5-MQTT"
|
||||
|
||||
@ -57,8 +58,9 @@ function update_script() {
|
||||
msg_ok "Built new PS5-MQTT version"
|
||||
|
||||
msg_info "Starting service"
|
||||
systemctl start ps5-mqtt
|
||||
systemctl start ps5-mqtt.service
|
||||
msg_ok "Started service"
|
||||
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
@ -24,15 +24,16 @@ $STD apt-get install -y \
|
||||
$STD npm i -g playactor
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
echo ${RELEASE} > /opt/ps5-mqtt_version.txt
|
||||
msg_ok "Installed PS5-MQTT"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@ -93,7 +94,8 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
cd /
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
rm /tmp/${RELEASE}.tar.gz
|
||||
rm ${RELEASE}.tar.gz
|
||||
msg_ok "Cleaned"
|
||||
|
Loading…
Reference in New Issue
Block a user