Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. IP="192.168.1.55"
  4. USERNAME="admin"
  5. PASSWORD=""
  6. TARGET_FOLDER="/storage"
  7. MOUNT_POINTS=( "administration" "finance" "business development" )
  8.  
  9. # Check if cifs-utils is already installed, if not install
  10. apk info cifs-utils || apk add cifs-utils
  11.  
  12. for i in "${MOUNT_POINTS[@]}"
  13. do
  14. [ -d "$TARGET_FOLDER/$i" ] || { echo "Creating folder $TARGET_FOLDER/$i"; mkdir -p "$TARGET_FOLDER/$i"; }
  15. mount.cifs "//$IP/$i" "$TARGET_FOLDER/$i"" -o ro,username=$USERNAME,password=$PASSWORD >/dev/null
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement