ns-kill (228B)
1 #!/bin/sh 2 3 usage() { 4 printf "usage: %s ns\n" "$(basename $1)" >&2 5 exit 1 6 } 7 8 [ $# -lt 1 ] && usage $0 9 10 nsroot="$(ns-root "$1")" 11 [ $? -gt 0 ] && exit $? 12 13 lsof -Fp "$nsroot" 2>/dev/null \ 14 | cut -b 2- \ 15 | xargs -n 1 kill -TERM 16