Update phpmyadmin.sh
This commit is contained in:
parent
1cedf95d51
commit
3ea38cd190
@ -59,11 +59,14 @@ function msg_error() { echo -e "${CROSS} ${RD}${1}${CL}"; }
|
||||
|
||||
function check_internet() {
|
||||
msg_info "Checking Internet connectivity"
|
||||
if ! curl -s --head https://phpmyadmin.net | grep "200 OK" >/dev/null; then
|
||||
msg_error "Internet connectivity or phpMyAdmin server unreachable. Exiting."
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://phpmyadmin.net)
|
||||
if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 400 ]]; then
|
||||
msg_ok "Internet connectivity OK"
|
||||
else
|
||||
msg_error "Internet connectivity or phpMyAdmin server unreachable (Status $HTTP_CODE). Exiting."
|
||||
exit 1
|
||||
fi
|
||||
msg_ok "Internet connectivity OK"
|
||||
|
||||
}
|
||||
|
||||
function install_php_and_modules() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user