fix: lowercase variables

This commit is contained in:
Kyle Kroboth 2025-03-12 23:25:38 -04:00
parent e238be2d3c
commit 32c28e0aa7
2 changed files with 10 additions and 10 deletions

View File

@ -30,8 +30,8 @@ function update_script() {
exit
fi
UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then
update_available=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
if [[ "${update_available}" == "true" ]]; then
msg_info "Stopping $APP"
systemctl stop fileflows
msg_ok "Stopped $APP"

View File

@ -103,8 +103,8 @@ msg_ok "Setup ${APPLICATION}"
msg_info "Setting ffmpeg variables in fileflows"
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')
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' \
"http://localhost:19200/api/variable" \
@ -112,25 +112,25 @@ $STD curl -s -X 'DELETE' \
-H 'Content-Type: application/json' \
-d "{
\"Uids\": [
\"$FFMPEG_UID\",
\"$FFPROBE_UID\"
\"$ffmpeg_uid\",
\"$ffprobe_uid\"
]
}"
FFMPEG_PATH=$(which ffmpeg)
FFPROBE_PATH=$(which ffprobe)
ffmpeg_path=$(which ffmpeg)
ffprobe_path=$(which ffprobe)
$STD 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' \
"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."