View stop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
touch temp.text | |
lsof -n -i4TCP:$1 | awk '{print $2}' > temp.text | |
pidToStop=`(sed '2q;d' temp.text)` | |
> temp.text | |
if [[ -n $pidToStop ]] | |
then | |
kill -9 $pidToStop | |
echo "!! $1 is stopped !!" | |
else |
View docker_setup_wsl.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install docker client | |
curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz > ~/docker.tar.gz | |
tar xzvf ~/docker.tar.gz | |
sudo mv ~/docker/docker /usr/local/bin/docker | |
rm -rf ~/docker | |
rm -f ~/docker.tar.gz | |
# install docker-compose client | |
curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64 > ~/docker-compose | |
chmod +x ~/docker-compose | |
sudo mv ~/docker-compose /usr/local/bin/docker-compose |