19 lines
529 B
Bash
Executable File
19 lines
529 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Smoke HTTP del paquete cache (APCu sólo existe en SAPI web).
|
|
set -u
|
|
|
|
check() {
|
|
local comp="$1" path="$2" expect="$3" body
|
|
if ! body="$(curl -fsS "$BASE$path" 2>/dev/null)"; then
|
|
echo "$PKG:$comp|fail" >> "$RESULTS"; return
|
|
fi
|
|
if printf '%s' "$body" | grep -qF "$expect"; then
|
|
echo "$PKG:$comp|ok" >> "$RESULTS"
|
|
else
|
|
echo " inesperado en $path: $(printf '%s' "$body" | head -c 200)" >&2
|
|
echo "$PKG:$comp|fail" >> "$RESULTS"
|
|
fi
|
|
}
|
|
|
|
check apcache /compat/cache/apcache 'APC_OK'
|