commit 3e49e360e148a77543326145ef3da7b5e5355d2c Author: Filip Date: Sun Oct 5 09:37:21 2025 +0200 Add smb-auto-mount.sh diff --git a/smb-auto-mount.sh b/smb-auto-mount.sh new file mode 100644 index 0000000..e809beb --- /dev/null +++ b/smb-auto-mount.sh @@ -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 \ No newline at end of file