mount script
This commit is contained in:
parent
c2ec771271
commit
78b8822571
1 changed files with 17 additions and 0 deletions
17
tools/mount.sh
Normal file
17
tools/mount.sh
Normal 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
|
Reference in a new issue