mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 10:19:54 +00:00
Bash is not always installed in /bin/bash. Mitigate that by relying on bash being in PATH.
30 lines
569 B
Bash
Executable File
30 lines
569 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function say() {
|
|
echo
|
|
echo "---------------------------------------------------------------"
|
|
echo $1
|
|
echo "---------------------------------------------------------------"
|
|
echo
|
|
}
|
|
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
then say "Use sudo to run this script"
|
|
exit
|
|
fi
|
|
|
|
for FILE in $(find ../examples/preflight/host/*.yaml)
|
|
do
|
|
if [ "${FILE}" = "../examples/preflight/host/tcp-load-balancer.yaml" ]
|
|
then say "Skipping ${FILE}"
|
|
continue
|
|
fi
|
|
|
|
say "Running Test ${FILE}"
|
|
|
|
../bin/preflight --interactive=false $FILE
|
|
done
|
|
|
|
|