Hirdetés

Új hozzászólás Aktív témák

  • vargalex

    Topikgazda

    válasz dash17291 #18736 üzenetére

    Hi!

    A hibák logolásához szerintem ennyi módosítás elég:

    #here we actually connect, and perform the update
    update_output=$( $retrieve_prog "$final_url" 2>&1 )

    verbose_echo "Update Output:"
    verbose_echo "$update_output"
    verbose_echo ""

    Azaz a hiba kimenetet is a standard outputra küldjük.

    Nem script-ből, de teszteltem.
    Eredeti módszer:

    root@OpenWrt:/usr/lib/ddns# update_output=$( curl "https://aaaa:a@members.dyndns.org/nic/update?hostname=szappantarto.dyndns.org&myip=94.248.229.181" )
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:lib(20):func(144):reason(134)
    More details here: http://curl.haxx.se/docs/sslcerts.html

    curl performs SSL certificate verification by default, using a "bundle"
    of Certificate Authority (CA) public keys (CA certs). If the default
    bundle file isn't adequate, you can specify an alternate file
    using the --cacert option.
    If this HTTPS server uses a certificate signed by a CA represented in
    the bundle, the certificate verification probably failed due to a
    problem with the certificate (it might be expired, or the name might
    not match the domain name in the URL).
    If you'd like to turn off curl's verification of the certificate, use
    the -k (or --insecure) option.
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns# echo $update_output

    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns#

    Error output átirányítással:

    root@OpenWrt:/usr/lib/ddns# update_output=$( curl "https://aaaa:a@members.dyndns.org/nic/update?hostname=szappantarto.dyndns.org&myip=94.248.229.181" 2>&1)
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns#
    root@OpenWrt:/usr/lib/ddns# echo $update_output
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:lib(20):func(144):reason(134) More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
    root@OpenWrt:/usr/lib/ddns#

    [ Szerkesztve ]

    Alex

Új hozzászólás Aktív témák