Skip to content
Snippets Groups Projects
Commit d43c2bc8 authored by Martin Pitt's avatar Martin Pitt
Browse files

init script do_all: don't stop at the first failed cluster

parent 87cc4375
No related branches found
No related tags found
No related merge requests found
......@@ -34,14 +34,18 @@ do_op_all() {
[ -d "/etc/postgresql/$2" ] || return
[ -z "$3" ] || echo -n "$3 PostgreSQL $2 database server:"
unset fail
for c in /etc/postgresql/"$2"/*; do
echo -n " "$(basename "$c")
ERRMSG=$($1 "$2" "$(basename "$c")" 2>&1) || {
echo "(FAILED)"
[ -z "$ERRMSG" ] || echo "ERROR: $ERRMSG" >&2
exit 1
}
ERRMSG="$ERRMSG\n"$($1 "$2" "$(basename "$c")" 2>&1) || {
echo -n "(FAILED)"
fail=1
}
done
if [ "$fail" ]; then
[ -z "$ERRMSG" ] || echo -e "\n$ERRMSG" >&2
exit 1
fi
[ -z "$3" ] || echo "."
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment