Merge pull request #390 from akuker/rdmark_kill_other_oled

Pkill other oled monitor scripts before starting new one
This commit is contained in:
Eric Helgeson 2021-10-27 13:49:48 -05:00 committed by GitHub
commit 61e596aedf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,12 @@ if [ $ERROR = 1 ] ; then
exit 1
fi
if pgrep -f "python3 rascsi_oled_monitor.py" &> /dev/null; then
echo "Detected active rascsi_oled_monitor.py process"
echo "Terminating before launching a new one."
sudo pkill -f "python3 rascsi_oled_monitor.py"
fi
if ! i2cdetect -y 1 &> /dev/null ; then
echo "i2cdetect -y 1 did not find a screen."
exit 2