Reorder code structure for ps5-mqtt script

This commit is contained in:
liecno 2025-01-04 11:52:40 +01:00
parent 399484f3ee
commit 15e8858ead

View File

@ -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,10 +36,6 @@ 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