18 lines
433 B
Bash
Executable file
18 lines
433 B
Bash
Executable file
#!/bin/bash
|
|
|
|
SMB_SHARE="//172.31.180.4/TCLI-Data-Repo"
|
|
MOUNT_POINT="/home/mfortin/TCLI-Data-Repo"
|
|
USER="matthieu.fortin"
|
|
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"
|
|
|
|
if mountpoint -q "$MOUNT_POINT"; then
|
|
echo "Successfully mounted $SMB_SHARE at $MOUNT_POINT"
|
|
else
|
|
echo "Failed to mount $SMB_SHARE"
|
|
fi
|