12 lines
137 B
Bash
12 lines
137 B
Bash
#!/bin/ash
|
|
|
|
host=127.0.0.1
|
|
port=8012
|
|
|
|
nc -w 1 -z $host $port 2>&1 >/dev/null
|
|
if [ $? -eq 0 ];then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|