From b26c7e7d450ec650459442b7a133b9d9d426be76 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:27:56 -0400 Subject: [PATCH] chore: more PR comments --- install/fileflows-install.sh | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index ec82b77..93cfd60 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -14,19 +14,6 @@ setting_up_container network_check update_os -wait_for_api() { - msg_info "Waiting for API to become available..." - while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") - if [ "$HTTP_STATUS" -eq 200 ]; then - msg_ok "API is now available!" - break - fi - msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." - sleep 5 - done -} - msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ @@ -46,7 +33,6 @@ $STD apt update DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb -$STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" @@ -103,7 +89,7 @@ wait_for_api ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -$STD curl -s -X 'DELETE' \ +response=$(curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -112,22 +98,22 @@ $STD curl -s -X 'DELETE' \ \"$ffmpeg_uid\", \"$ffprobe_uid\" ] -}" +}") ffmpeg_path=$(which ffmpeg) ffprobe_path=$(which ffprobe) -$STD curl -s -X 'POST' \ +response=$(curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}" + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}") -$STD curl -s -X 'POST' \ +response=$(curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}" + -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}") msg_ok "ffmpeg and ffprobe variables have been updated successfully."