From dca09dedace304c083fc2e343ebdebdb967f3f79 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 12 Apr 2016 23:43:24 +0800 Subject: [PATCH] kill nc process --- le.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/le.sh b/le.sh index fd386226..d27735c0 100755 --- a/le.sh +++ b/le.sh @@ -658,11 +658,16 @@ _stopserver(){ return fi - if [[ "$(ps | grep "$pid" | grep "nc")" ]] ; then - _debug "Found nc process, kill it." + if [[ "$(ps | grep "$pid")" ]] ; then + _debug "Found proc process, kill it." kill -s 9 $pid > /dev/null 2>&1 fi + for ncid in $(ps | grep nc | cut -d " " -f 1) ; do + _debug "kill $ncid" + kill -s 9 $ncid > /dev/null 2>&1 + done + _get "http://localhost:$Le_HTTPPort" >/dev/null 2>$1 }