Raspberry Pi – Networking Script Change

Made some modifications to my script – made a function for writing to the file, which saved a lot of reused code, and instead of assuming that it could ping Google if the result wasn’t ‘unknown host www.google.co.uk’ – changed it to detect the words ‘ bytes from’ – from ’64 bytes from x’.

Find the code at: http://www.matthewrobbins.co.uk/files/connectiontest.py

Next up – try and make a script that detects if mjpg streamer is actually broadcasting video – if not, restart the service (this can fix issues that arise if the webcam is plugged in after boot)

Matt