diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-01-11 17:52:53 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-01-11 17:52:53 +0300 |
commit | 72a45b852105a9e62d700dffba62f436c4e0ca55 (patch) | |
tree | c7a21b0f08c530d7a05c493754446b38d6a14628 | |
parent | 014f310353328e93bcf490e2ce22425f53d024ff (diff) |
ipcam_capture: check for mountpoint
-rwxr-xr-x | tools/ipcam_capture.sh | 2 |
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." |