Created
June 23, 2017 08:55
-
-
Save tafaust/ec34f3f9a412efa54dd368e476eff238 to your computer and use it in GitHub Desktop.
Shell script to terminate all services started by DC/OS that run on the master node. Source: https://dcos.io/docs/1.9/installing/ports/
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
#!/usr/bin/bash | |
killall nginx 2>/dev/null && echo "Killing nginx service on ports 80, 443" | |
for port in {53,1050,1801,2181,5050,7070,8080,8123,8181,9990,15055,15101,15201}; do | |
kill -9 $(netstat -tlnp | awk "/:$port */ {split(\$NF,a,\"/\"); print a[1]}") 2>/dev/null && echo "Killing service that runs on port $port" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment