Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- Dpath=/home/$USER/Docker/
- IP=`sed -n 1p /home/medma/.medmadoc`
- DockerMachine=`sed -n 2p /home/$USER/.medmadoc`
- DockerPort=`sed -n 5p /home/$USER/.medmadoc`
- DockerUser=`sed -n 3p /home/$USER/.medmadoc`
- DockerPass=`sed -n 4p /home/$USER/.medmadoc`
- if [ ! -d $Dpath ] ; then
- mkdir -p $Dpath
- else
- stat=`wget -O ".dockerid" http://$IP/DOCKER-STAT.txt`
- for ids in `cat .dockerid`
- do
- if [ "$ids" == "$DockerMachine" ] ; then
- gnome-terminal -x sh -c 'sshfs -p$DockerPort $DockerUser@$IP:/var/www/html $Dpath ; bash '
- nautilus $Dpath
- zenity --info --text "Mounted $DockerMachine"
- exit
- else
- :
- fi
- done
- zenity --info --text "No Such ID:$DockerMachine"
- fi
Add Comment
Please, Sign In to add comment