From 1cbdbaedb99730fa565dc44fa21b1358b246c580 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 18 Sep 2021 17:41:22 +0200 Subject: [PATCH] add .bin/voc-mount to repo --- .bin/voc-mount | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 .bin/voc-mount diff --git a/.bin/voc-mount b/.bin/voc-mount new file mode 100755 index 0000000..0c37e63 --- /dev/null +++ b/.bin/voc-mount @@ -0,0 +1,24 @@ +#!/bin/bash + +# mount a voc encoder or minion to /video + +device=$1 + +[[ -n "$DEBUG" ]] && set -x +set -euo pipefail + +uid="$(id -u)" + +if [[ -z "$device" ]] +then + echo "Usage: $0 " >&2 + exit 1 +fi + +if ! [[ -d "/video/fuse" ]] +then + sudo mkdir -p "/video/fuse" +fi + +sudo mount -t cifs -o "uid=${uid},password=" "//${device}.lan.c3voc.de/video" "/video" +sudo mount -t cifs -o "uid=${uid},password=" "//${device}.lan.c3voc.de/fuse" "/video/fuse"