mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 11:50:06 +00:00
fix(addons): ensure curl is installed before use in all addon scripts (#11718)
This commit is contained in:
parent
ee3e53a1a2
commit
157e69b365
15 changed files with 58 additions and 3 deletions
|
|
@ -57,6 +57,10 @@ function msg_ok() { echo -e "${CM} ${GN}${1}${CL}"; }
|
|||
function msg_error() { echo -e "${CROSS} ${RD}${1}${CL}"; }
|
||||
|
||||
function check_internet() {
|
||||
if ! command -v curl &>/dev/null; then
|
||||
apt-get update >/dev/null 2>&1
|
||||
apt-get install -y curl >/dev/null 2>&1
|
||||
fi
|
||||
msg_info "Checking Internet connectivity to GitHub"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://github.com)
|
||||
if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 400 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue