Skip to content

Error on line 219 in nginxproxymanager.sh (FIXED)Β #15015

Description

@galz55

βœ… Have you read and understood the above guidelines?

yes

πŸ”Ž Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

πŸ“œ What is the name of the script you are using?

https://github.com/community-scripts/ProxmoxVE/blob/main/ct/nginxproxymanager.sh

πŸ“‚ What was the exact command used to execute the script?

update

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 13

🧱 Is this Proxmox host running arm64?

Yes

πŸ“ˆ Which Proxmox version are you on?

9.2

πŸ“ Provide a clear and concise description of the issue.

Launching update from the command line in LXC ends with an error on line 219 of the script.

πŸ”„ Steps to reproduce the issue.

launch update from command line, or the script.

❌ Paste the full error output (if available).

ERROR ON LINE 219 - CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')

πŸ–ΌοΈ Additional context (optional).

As said on the title I had it fixed modifiying the script with AI help changing that line to:

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

The AI explanation was:
"The error you are experiencing on that line usually occurs due to a very subtle detail: awk breaks or returns an error if the path /opt/certbot/bin/certbot does not exist or if it is executed within an environment where the variable is not processed correctly, blocking the script because of the catch_errors function (which usually has set -e enabled to stop the script upon any failure).

Even if you have certbot installed globally on your system, this specific Proxmox VE script (from the tteck community) looks for an exclusive Python virtual environment in /opt/certbot/. If that folder does not exist or is corrupted, the command fails instantly."

Indeed my certbot location its in /usr/...

This instalation comes from earlier versions of npm and debian 12.

I open this as an issue because I do not know if it's just my container problem. Maybe the solution works for me but its not good for everyone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions