FreePBX / sng_freepbx_debian_install

FreePBX 17 Installation Script
51 stars 15 forks source link

[improvement]: be sure to validate installed binaries before using it #55

Closed HLeithner closed 6 days ago

HLeithner commented 2 weeks ago

FreePBX Version

FreePBX 17

Improvement Description

I would suggest to check for lsb_release and wget binary before using them

kguptasangoma commented 2 weeks ago

hi @HLeithner sorry , could you please explain bit more like why we need to check for lsb_release ?

digdug3 commented 2 weeks ago

I had the same issue and had to apt install lsb-release before running the script.

HLeithner commented 2 weeks ago

@kguptasangoma we use our own down striped debian template vms which has no package installed we commonly don't need. So the lsb-release package and wget package is not installed. to run the script I hardcoded "Debian" in the DISTRIBUTION variable and installed wget.

Maybe it's common that lsb-release is available but maybe not always. Also instead of wget we have curl installed per default.

It's not a big issue but makes the script error safe.

spessoni commented 6 days ago

I had the same issue using a container on Proxmox (LXC).

_debian-12-standard_12.2-1amd64.tar.zst did not have lsb-release.

running apt install lsb-release allowed the script to continue.

kguptasangoma commented 6 days ago

Fixed in the latest version.