name=ssh-server2 test -n "$(podman ps -q --filter "name=$name")" ; echo $?
Change -n to -z to test for the inverse.
-n
-z