Adds error notification as sound for a faulty interface.

This commit is contained in:
Lukas Prause
2022-11-14 13:04:44 +01:00
parent 0e2a9789b2
commit 20a70979c1

View File

@@ -4,6 +4,31 @@ WORKING_DIR="/home/prause/measurement-scripts/"
DATE=$(date +%F_%H-%M-%S)
NEW_DIR="/home/prause/mobile_measurements/$DATE/"
ethtool -k wwan1
STATE=$?
if test $STATE -ne 0
then
for n in 1 2 3 ; do
for f in 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600; do
beep -f $f -l 20
done
done
exit 1
fi
/root/connect-modem.py -l telekom
if test $STATE -ne 0
then
for n in 1 2 3 ; do
for f in 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600; do
beep -f $f -l 20
done
done
exit 1
fi
export PIPENV_VENV_IN_PROJECT=1
mkdir $NEW_DIR
cd $WORKING_DIR
@@ -17,4 +42,5 @@ pipenv run pipenv run ./measurement_main.py -c 130.75.73.69 \
-n 600 \
--folder $NEW_DIR \
--prefix automated_$DATE \
-i wwan0
-i wwan0 \
| tee $NEW_DIR/automated_$DATE_measurement.log