Add smb-auto-mount.sh
This commit is contained in:
commit
3e49e360e1
21
smb-auto-mount.sh
Normal file
21
smb-auto-mount.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Must set
|
||||
USERNAME=filips
|
||||
PASSWORD=password
|
||||
DOMAIN=milsistemika.com
|
||||
MOUNT_TO="/home/f/devops"
|
||||
|
||||
if test $(whoami) != "root"
|
||||
then
|
||||
echo "Must run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir ${CONFIG_DIRECTORY}
|
||||
cd ${CONFIG_DIRECTORY}
|
||||
echo \
|
||||
"username=${USERNAME}
|
||||
password=${PASSWORD}
|
||||
domain=${DOMAIN}" > creds
|
||||
|
||||
mkdir "${MOUNT_TO}"
|
||||
mount -t cifs "//devops.milsistemika.com/NugetN" "${MOUNT_TO}" -o credentials=/etc/smb-auto-mount/creds,ro
|
||||
Loading…
Reference in a new issue