Commit f04d9754 authored by Afaq Tariq's avatar Afaq Tariq
Browse files

Merge pull request #359 from alozovskoy/ping_fix

Fix ping module (https://github.com/afaqurk/linux-dash/issues/358)
parents 8bc95da3 a0b72bcf
......@@ -12,7 +12,7 @@ sedCmd=`which sed`
numOfLinesInConfig=`$sedCmd -n '$=' $CONFIG_PATH`
result='['
{ $catCmd $CONFIG_PATH; echo; } \
$catCmd $CONFIG_PATH \
| while read output
do
singlePing=$($pingCmd -qc 2 $output \
......@@ -20,7 +20,7 @@ result='['
)
numOfLinesInConfig=$(($numOfLinesInConfig-1))
result=$result$singlePing
if [ $numOfLinesInConfig -eq 1 ]
if [ $numOfLinesInConfig -eq 0 ]
then
echo $result"]"
fi
......
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