Browse files

check listen port running

  • Loading branch information...
1 parent ef7285b commit e0dbd89dc1c9859ee5b3377dd6fc68e69d332983 @ronalfei committed Mar 6, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 checkPortRunning.sh
View
12 checkPortRunning.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+pid=`ss -l4np | grep 12315 | awk -F\, '{print $2}'`
+echo =$pid=
+if [ -z $pid ]
+then
+ echo "not running"
+ ssh -qfTnN -D *:12315 -p 443 hyena_@123.150.177.30
+ echo "start ok"
+else
+ echo "already running"
+fi
+

0 comments on commit e0dbd89

Please sign in to comment.