Merged pryoidain's patch from Github issue #339
Added missing chmod +x from last commit (Gentoo fixes).
Use $check_url in update_device_info instead of $control_panel_url.
Do not use -k in Linux config curl call.