20 lines
561 B
Bash
Executable file
20 lines
561 B
Bash
Executable file
#!/bin/bash
|
|
|
|
#SMB_SHARE="//172.31.180.13/TCLI_Courses"
|
|
SMB_SHARE="//172.31.180.13/TCLI_Courses"
|
|
MOUNT_POINT="$HOME/TCLI_Courses"
|
|
#USER="mfortin"
|
|
#PASSWORD="New42d@y"
|
|
|
|
if [ ! -d "$MOUNT_POINT" ]; then
|
|
mkdir -p "$MOUNT_POINT"
|
|
fi
|
|
|
|
#sudo mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o username="$USER",password="$PASSWORD",gid=1000,uid=1000
|
|
sudo mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o credentials=~/.config/credentials
|
|
|
|
if mountpoint -q "$MOUNT_POINT"; then
|
|
echo "Successfully mounted $SMB_SHARE at $MOUNT_POINT"
|
|
else
|
|
echo "Failed to mount $SMB_SHARE"
|
|
fi
|