2021-07-30 11:34:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-11-18 17:10:19 +00:00
|
|
|
python3 "${ROOT_DIRECTORY}"/bazarr.py --no-update &
|
2021-07-30 11:34:57 +00:00
|
|
|
PID=$!
|
|
|
|
|
|
|
|
sleep 30
|
|
|
|
|
|
|
|
if kill -s 0 $PID
|
|
|
|
then
|
2024-07-07 03:29:26 +00:00
|
|
|
echo "Bazarr is still running. We'll test if UI is working..."
|
2021-07-30 11:34:57 +00:00
|
|
|
else
|
|
|
|
exit 1
|
2024-07-07 03:29:26 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exitcode=0
|
|
|
|
curl -fsSL --retry-all-errors --retry 60 --retry-max-time 120 --max-time 10 "http://127.0.0.1:6767" --output /dev/null || exitcode=$?
|
|
|
|
[[ ${exitcode} == 0 ]] && echo "UI is responsive, good news!" || echo "Oops, UI isn't reachable, bad news..."
|
|
|
|
|
|
|
|
echo "Let's stop Bazarr before we exit..."
|
|
|
|
pkill -INT -P $PID
|
|
|
|
|
|
|
|
exit ${exitcode}
|