stow_dotfiles/scripts/.local/bin/mounttcli
Matthieu Fortin (CPC/CCP) 18dc031492 updates
2024-11-05 08:00:49 -05:00

18 lines
443 B
Bash
Executable file

#!/bin/bash
SMB_SHARE="//172.31.180.4/TCLI-Data-Repo"
MOUNT_POINT="$HOME/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",gid=1000,uid=1000
if mountpoint -q "$MOUNT_POINT"; then
echo "Successfully mounted $SMB_SHARE at $MOUNT_POINT"
else
echo "Failed to mount $SMB_SHARE"
fi