I think your problem is that you have the
exit command in a
( ... )-enclosed group, which will execute all commands inside in a sub-shell specifically created for that command group only. So, your
exit statement only applies to the sub-shell and not the main shell used to run your script.
In this case, I would recommend explicit test commands instead of the "one-liner" approach:
if Br3trans -u / -c -f dbstate
echo "Datenbank ist online"
echo "Nächster Schritt ..."
echo "Datenbank ist offline"
You can still write it as a one-liner if you like:
if Br3trans -u / -c -f dbstate; then echo "Datenbank ist online"; echo "Nächster Schritt"; else echo "Datenbank ist offline"; exit 1; fi