File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,16 @@ COPY --chmod=755 <<-'EOF' /usr/bin/ctbcap-healthcheck
7272 ;;
7373 esac
7474
75- # Is directories writable?
76- [ ! -w "${SAVE_PATH}" ] && { echo "(ERROR) SAVE_PATH is unwritable!" ; exit 1; }
77- [ "${LOG_PATH}" = 0 ] || {
78- [ ! -w "${LOG_PATH}" ] && { echo "(ERROR) LOG_PATH is unwritable!" ; exit 1; }
79- }
80-
8175 FFMPEG_PROCESS="$(ps -ef | grep -oE " [f]fmpeg.*-i.*.m3u8.*${MODEL}.*.mkv" 2>/dev/null | head -n 1)"
8276 # If has FFmpeg process...
8377 [ -n "${FFMPEG_PROCESS}" ] && {
78+
79+ # Is directories writable?
80+ [ ! -w "${SAVE_PATH}" ] && { echo "(ERROR) [${SAVE_PATH}] is unwritable!" ; exit 1; }
81+ [ "${LOG_PATH}" = 0 ] || {
82+ [ ! -w "${LOG_PATH}" ] && { echo "(ERROR) [${LOG_PATH}] is unwritable!" ; exit 1; }
83+ }
84+
8485 STREAM_URL="$(echo " ${FFMPEG_PROCESS}" | grep -oE 'http[s]?://[^ ]+\. m3u8')"
8586 UA="$(ctbcap -v | grep '^UA: ' | sed 's|UA: ||')"
8687 [ -z "${UA}" ] && { echo "(ERROR) UA does not exist!" ; exit 1; }
You can’t perform that action at this time.
0 commit comments