Guest User

Untitled

a guest
Apr 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. Dpath=/home/$USER/Docker/
  4. IP=`sed -n 1p /home/medma/.medmadoc`
  5. DockerMachine=`sed -n 2p /home/$USER/.medmadoc`
  6. DockerPort=`sed -n 5p /home/$USER/.medmadoc`
  7. DockerUser=`sed -n 3p /home/$USER/.medmadoc`
  8. DockerPass=`sed -n 4p /home/$USER/.medmadoc`
  9.  
  10. if [ ! -d $Dpath ] ; then
  11. mkdir -p $Dpath
  12. else
  13. stat=`wget -O ".dockerid" http://$IP/DOCKER-STAT.txt`
  14. for ids in `cat .dockerid`
  15. do
  16. if [ "$ids" == "$DockerMachine" ] ; then
  17. gnome-terminal -x sh -c 'sshfs -p$DockerPort $DockerUser@$IP:/var/www/html $Dpath ; bash '
  18. nautilus $Dpath
  19. zenity --info --text "Mounted $DockerMachine"
  20. exit
  21. else
  22. :
  23. fi
  24. done
  25. zenity --info --text "No Such ID:$DockerMachine"
  26. fi
Add Comment
Please, Sign In to add comment