Welcome to mirror list, hosted at ThFree Co, Russian Federation.

post-refresh « hooks « snap « certbot-dns-dnsimple - github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c4dae23076e4e72ff18d6667fe36d5e023890739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

# get certbot version
cb_installed="$(snapctl get cb-installed)"

if [ -z "$cb_installed" ]; then
    echo "cb_installed not set, not doing version comparison check" > "$SNAP_DATA/debuglog"
    exit 0
fi

echo "cb_installed: $cb_installed" > "$SNAP_DATA/debuglog" > "$SNAP_DATA/debuglog"

# 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 \
    this plugin can be updated; will try again on next refresh."
    exit 1
fi