mount script

This commit is contained in:
Didier Slof 2022-12-14 09:17:03 +01:00
parent c2ec771271
commit 78b8822571
Signed by: didier
GPG key ID: 01E71F18AA4398E5

17
tools/mount.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/sh
ORIGIN=`pwd`
if [ "$(id -u)" -ne 0 ]; then
echo "Please run as root"
exit
fi
cd /etc/credentials
for file in ./* do
echo "# mounting $file"
. $file
mount -t cifs //$domain/backup /mnt/$file -o credentials=/etc/credentials/$file
fi
cd $ORIGIN