Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- IP="192.168.1.55"
- USERNAME="admin"
- PASSWORD=""
- TARGET_FOLDER="/storage"
- MOUNT_POINTS=( "administration" "finance" "business development" )
- # Check if cifs-utils is already installed, if not install
- apk info cifs-utils || apk add cifs-utils
- for i in "${MOUNT_POINTS[@]}"
- do
- [ -d "$TARGET_FOLDER/$i" ] || { echo "Creating folder $TARGET_FOLDER/$i"; mkdir -p "$TARGET_FOLDER/$i"; }
- mount.cifs "//$IP/$i" "$TARGET_FOLDER/$i"" -o ro,username=$USERNAME,password=$PASSWORD >/dev/null
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement