Commit 295e145c authored by Ivan Tyagov's avatar Ivan Tyagov

More robust code.

parent 5104a4c0
...@@ -9,6 +9,8 @@ port=20000 ...@@ -9,6 +9,8 @@ port=20000
for pid in $ZOPE_PIDS; for pid in $ZOPE_PIDS;
do do
# remove any trailing character in case PID is less than 5 digits
pid="$(echo ${pid} | sed 's/,//')"
ip_port="$(netstat -lpn --inet --inet6 | grep $pid/ |awk '{print substr($0, 21, 17);}')"; ip_port="$(netstat -lpn --inet --inet6 | grep $pid/ |awk '{print substr($0, 21, 17);}')";
#echo $pid, $ip_port, $port #echo $pid, $ip_port, $port
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment