#!/usr/bin/env bash engi_path="$HOME/mnt/engi" if mountpoint -q "$engi_path"; then echo "engi already mounted" exit 0 else sudo mount -t cifs -o rw,uid=$(id -u $(whoami)),gid=$(id -g $(whoami)),vers=3.0,credentials=/home/tstarr/.smb //torus/private ~/mnt/engi 2>/dev/null fi # Check drive mounted correctly if mountpoint -q "$engi_path"; then echo "engi successfully mounted" else echo "engi failed to mount" fi