aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2024-01-11 17:52:53 +0300
committerEvgeny Zinoviev <me@ch1p.io>2024-01-11 17:52:53 +0300
commit72a45b852105a9e62d700dffba62f436c4e0ca55 (patch)
treec7a21b0f08c530d7a05c493754446b38d6a14628
parent014f310353328e93bcf490e2ce22425f53d024ff (diff)
ipcam_capture: check for mountpoint
-rwxr-xr-xtools/ipcam_capture.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/ipcam_capture.sh b/tools/ipcam_capture.sh
index 705c920..d495e51 100755
--- a/tools/ipcam_capture.sh
+++ b/tools/ipcam_capture.sh
@@ -94,6 +94,8 @@ done
[ -z "$CREDS" ] && die "You must specify credentials (--creds)."
validate_channel "$CHANNEL"
+mountpoint "$(dirname "$OUTDIR")" || die "$(dirname "$OUTDIR") is not a mountpint!"
+
if [ ! -d "${OUTDIR}" ]; then
mkdir "${OUTDIR}" || die "Failed to create ${OUTDIR}/${NAME}!"
echo "Created $OUTDIR."