mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-09 17:28:31 +00:00
Fix-15015: check correct path for certbot (#15034)
Co-authored-by: galz55 <damianbc-github@gmail.com>
This commit is contained in:
parent
7f363170f3
commit
c1a6dc29ee
1 changed files with 7 additions and 1 deletions
|
|
@ -221,7 +221,13 @@ EOF
|
|||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Starting Services"
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')
|
||||
if [ -f /opt/certbot/bin/certbot ]; then
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}' || echo "0.0.0")
|
||||
elif command -v certbot &>/dev/null; then
|
||||
CERTBOT_VER=$(certbot --version 2>&1 | awk '{print $NF}' || echo "0.0.0")
|
||||
else
|
||||
CERTBOT_VER="2.0.0"
|
||||
fi
|
||||
if grep -q "Environment=CERTBOT_VERSION" /lib/systemd/system/npm.service; then
|
||||
sed -i "s|Environment=CERTBOT_VERSION=.*|Environment=CERTBOT_VERSION=${CERTBOT_VER}|" /lib/systemd/system/npm.service
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue