add .bin/voc-mount to repo

This commit is contained in:
Franzi 2021-09-18 17:41:22 +02:00
parent b221b0574b
commit 1cbdbaedb9
Signed by: kunsi
GPG key ID: 12E3D2136B818350

24
.bin/voc-mount Executable file
View file

@ -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 <device>" >&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"