From 40ebff2c64107b7b08348baa5b1e0554a8f87485 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Mon, 13 Jul 2020 18:49:59 -0700 Subject: [PATCH] echo to debug log to understand what's going on exactly. we have file access though! --- certbot-dns-dnsimple/snap/hooks/post-refresh | 3 ++- certbot-dns-dnsimple/snap/hooks/pre-refresh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/certbot-dns-dnsimple/snap/hooks/post-refresh b/certbot-dns-dnsimple/snap/hooks/post-refresh index e15e7b54b..9ba00a2eb 100644 --- a/certbot-dns-dnsimple/snap/hooks/post-refresh +++ b/certbot-dns-dnsimple/snap/hooks/post-refresh @@ -4,12 +4,13 @@ cb_installed="$(snapctl get cb-installed)" if [ -z "$cb_installed" ]; then - echo "cb_installed not set, not doing version comparison check" + echo "cb_installed not set, not doing version comparison check" > "$SNAP_DATA/debuglog" exit 0 fi # get required certbot version for plugin cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py) +echo "cb_required: $cb_required" > "$SNAP_DATA/debuglog" if [ "$cb_installed" -lt "$cb_required" ]; then echo "Certbot is version $cb_installed but needs to be at least $cb_required before \ diff --git a/certbot-dns-dnsimple/snap/hooks/pre-refresh b/certbot-dns-dnsimple/snap/hooks/pre-refresh index 85ad48922..fbc4c3986 100644 --- a/certbot-dns-dnsimple/snap/hooks/pre-refresh +++ b/certbot-dns-dnsimple/snap/hooks/pre-refresh @@ -3,12 +3,12 @@ first_install="$(snapctl get first-install)" if [ -z "$first_install" ]; then snapctl set first-install="false" - echo "first install, not doing any version comparison checks" + echo "first install, not doing any version comparison checks" > "$SNAP_DATA/debuglog" exit 0 fi -echo "ls $SNAP/certbot-shared:" +echo "ls $SNAP/certbot-shared:" > "$SNAP_DATA/debuglog" ls $SNAP/certbot-shared -cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-shared) -echo "cb_installed: $cb_installed" +cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-shared/__init__.py) +echo "cb_installed: $cb_installed" > "$SNAP_DATA/debuglog" snapctl set cb-installed="$cb_installed"