echo to debug log to understand what's going on exactly. we have file access though!

This commit is contained in:
Erica Portnoy 2020-07-13 18:49:59 -07:00
parent f83237e629
commit 40ebff2c64
2 changed files with 6 additions and 5 deletions

View file

@ -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 \

View file

@ -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"