1
0
mirror of https://github.com/dennypage/dpinger.git synced 2024-05-19 06:50:01 +00:00

Confirm that the rrd file is writable before starting

This commit is contained in:
Denny Page
2016-03-01 22:14:36 -08:00
parent ef21655e77
commit c276feb339

View File

@ -15,6 +15,11 @@ dpinger=/usr/local/bin/dpinger
rrdfile="${name}.rrd" rrdfile="${name}.rrd"
if [ \! -w ${rrdfile} ]
then
echo "$0: file \"${rrdfile}\" does not exist or is not writable"
exit 1
fi
${dpinger} -f ${options} -s 500m -t 60s -r 60s ${targetip} | ${dpinger} -f ${options} -s 500m -t 60s -r 60s ${targetip} |
while read -r latency stddev loss; do while read -r latency stddev loss; do