diff --git a/certbot-dns-dnsimple/snap/hooks/post-refresh b/certbot-dns-dnsimple/snap/hooks/post-refresh index 8947c96bb..4e91ca9a9 100644 --- a/certbot-dns-dnsimple/snap/hooks/post-refresh +++ b/certbot-dns-dnsimple/snap/hooks/post-refresh @@ -1,16 +1,22 @@ #!/bin/sh -e +cb_version="$(snapctl get internal-certbot-version)" +cb_version_2="$(snapctl get internal-certbot-version-2)" + +echo "post cb_version $cb_version" +echo "post cb_version_2 $cb_version_2" + # get certbot version -cb_installed="$(snapctl get cb-installed)" +# cb_installed="$(snapctl get cb-installed)" -if [ -z "$cb_installed" ]; then - exit 0 -fi +# if [ -z "$cb_installed" ]; then +# exit 0 +# fi -# get required certbot version for plugin -cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py) +# # get required certbot version for plugin +# cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py) -if [ "$cb_installed" -lt "$cb_required" ]; then - echo "Certbot needs to be updated before this plugin can be updated; will try again on next refresh." - exit 1 -fi +# if [ "$cb_installed" -lt "$cb_required" ]; then +# echo "Certbot needs to be updated before this plugin can be updated; will try again on next refresh." +# exit 1 +# fi diff --git a/certbot-dns-dnsimple/snap/hooks/pre-refresh b/certbot-dns-dnsimple/snap/hooks/pre-refresh index b3a4797d3..20e64102e 100644 --- a/certbot-dns-dnsimple/snap/hooks/pre-refresh +++ b/certbot-dns-dnsimple/snap/hooks/pre-refresh @@ -1,11 +1,19 @@ #!/bin/sh -e -first_install="$(snapctl get first-install)" -if [ -z "$first_install" ]; then - snapctl set first-install="false" - exit 0 -fi +cb_version="$(snapctl get :certbot certbot-version)" +cb_version_2="$(snapctl get :certbot-version certbot-version)" +snapctl set internal-cb-version=$cb_version +snapctl set internal-cb-version_2=$cb_version_2 -cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-exec) -echo "cb_installed $cb_installed" -snapctl set cb-installed="$cb_installed" +echo "pre cb_version $cb_version" +echo "pre cb_version_2 $cb_version_2" + +# first_install="$(snapctl get first-install)" +# if [ -z "$first_install" ]; then +# snapctl set first-install="false" +# exit 0 +# fi + +# cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-exec) +# echo "cb_installed $cb_installed" +# snapctl set cb-installed="$cb_installed" diff --git a/snap/hooks/connect-plug-plugin b/snap/hooks/connect-plug-plugin new file mode 100644 index 000000000..c71af7441 --- /dev/null +++ b/snap/hooks/connect-plug-plugin @@ -0,0 +1,6 @@ +#!/bin/sh -e + + + +snapctl set :plugin certbot-version="test1" +snapctl set :certbot-version certbot-version="test2"