mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
check if certbot version will be available post-refresh after all
This commit is contained in:
parent
6bde33f707
commit
4cc0390b38
2 changed files with 18 additions and 12 deletions
|
|
@ -1,13 +1,19 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# get certbot version
|
||||
cb_installed="$(snapctl get cb-installed)"
|
||||
# cb_installed="$(snapctl get cb-installed)"
|
||||
|
||||
if [ -z "$cb_installed" ]; then
|
||||
echo "cb_installed not set, not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
# if [ -z "$cb_installed" ]; then
|
||||
# echo "cb_installed not set, not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
if [ ! -f "$SNAP/certbot-shared/__init__.py" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cb_installed=$(grep -oP "__version__ = '\K.*(?=')" $SNAP/certbot-shared/__init__.py)
|
||||
echo "cb_installed: $cb_installed" >> "$SNAP_DATA/debuglog"
|
||||
|
||||
# get required certbot version for plugin
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
echo "ls $SNAP/certbot-shared:" >> "$SNAP_DATA/debuglog"
|
||||
ls $SNAP/certbot-shared >> "$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
|
||||
# if [ ! -f "$SNAP/certbot-shared/__init__.py" ]; then
|
||||
# echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
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"
|
||||
# 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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue