mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
blockcheck: fix sleep
This commit is contained in:
parent
719a5355b8
commit
46af34c59c
@ -109,7 +109,7 @@ check_system()
|
|||||||
|
|
||||||
local UNAME=$(uname)
|
local UNAME=$(uname)
|
||||||
[ "$UNAME" = "Linux" ] || {
|
[ "$UNAME" = "Linux" ] || {
|
||||||
echo not supported
|
echo $UNAME not supported
|
||||||
exitp 5
|
exitp 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,10 +199,14 @@ tpws_ipt_unprepare()
|
|||||||
nfqws_start()
|
nfqws_start()
|
||||||
{
|
{
|
||||||
"$NFQWS" --dpi-desync-fwmark=$DESYNC_MARK --qnum=$QNUM "$@" >/dev/null &
|
"$NFQWS" --dpi-desync-fwmark=$DESYNC_MARK --qnum=$QNUM "$@" >/dev/null &
|
||||||
|
PID=$!
|
||||||
}
|
}
|
||||||
tpws_start()
|
tpws_start()
|
||||||
{
|
{
|
||||||
"$TPWS" --uid $TPWS_UID:$TPWS_UID --bind-addr=$LOCALHOST --port=$TPPORT "$@" >/dev/null &
|
"$TPWS" --uid $TPWS_UID:$TPWS_UID --bind-addr=$LOCALHOST --port=$TPPORT "$@" >/dev/null &
|
||||||
|
PID=$!
|
||||||
|
# give some time to initialize
|
||||||
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_test()
|
curl_test()
|
||||||
@ -227,17 +231,15 @@ ws_curl_test()
|
|||||||
# $2 - test function
|
# $2 - test function
|
||||||
# $3 - domain
|
# $3 - domain
|
||||||
# $4,$5,$6, ... - ws params
|
# $4,$5,$6, ... - ws params
|
||||||
local code pid ws_start=$1 testf=$2 dom=$3
|
local code ws_start=$1 testf=$2 dom=$3
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
$ws_start "$@"
|
$ws_start "$@"
|
||||||
pid=$!
|
|
||||||
# let some time for tpws to initialize
|
# let some time for tpws to initialize
|
||||||
sleep 1
|
|
||||||
curl_test $testf $dom
|
curl_test $testf $dom
|
||||||
code=$?
|
code=$?
|
||||||
killwait -9 $pid
|
killwait -9 $PID
|
||||||
return $code
|
return $code
|
||||||
}
|
}
|
||||||
tpws_curl_test()
|
tpws_curl_test()
|
||||||
|
Loading…
Reference in New Issue
Block a user