diff options
-rw-r--r-- | certbot-dns-dnsimple/snap/hooks/pre-refresh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/certbot-dns-dnsimple/snap/hooks/pre-refresh b/certbot-dns-dnsimple/snap/hooks/pre-refresh index 8998fecb5..bf1521d22 100644 --- a/certbot-dns-dnsimple/snap/hooks/pre-refresh +++ b/certbot-dns-dnsimple/snap/hooks/pre-refresh @@ -1,14 +1,13 @@ #!/bin/sh -e -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" >> "$SNAP_DATA/debuglog" +echo "ls $SNAP/certbot-shared:" >> "$SNAP_DATA/debuglog" +ls $SNAP/certbot-shared >> "$SNAP_DATA/debuglog" + +if [ ! -f "$SNAP/certbot-shared/__init__.py" ]; then + echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog" exit 0 fi -echo "ls $SNAP/certbot-shared:" >> "$SNAP_DATA/debuglog" -ls $SNAP/certbot-shared >> "$SNAP_DATA/debuglog" cb_installed=$(grep -oP "__version__ = '\K.*(?=')" $SNAP/certbot-shared/__init__.py) echo "cb_installed: $cb_installed" >> "$SNAP_DATA/debuglog" snapctl set cb-installed="$cb_installed" |