Connect to MQTT before forking.
Make MQTT optional at startup.
Try to reconnect on disconnect.