    # Send the reboot command with required cookie and csrf token.
    reboot_ret=$(curl -i -s -H "Cookie: userid=$login_ret;" --data "model=%7B%22reboot%22%3A%221%22%7D&csrf_token=$csrf_ret" http://$modem_ip/goform/Reboot | head -1);

    # If the response from the reboot command is 200, everything is good.
    if [ "$reboot_ret" == "HTTP/1.1 200 OK" ] ; then
        echo "Reboot success.";
        # Exit with true.
        exit 1;
    else
        # Error on anything that isn't a 200.
        echo "Reboot failed: $reboot_ret";
    fi
else
    # Login error.