I want to have my .bashrc detect if running emacsclient would work in lieu of running emacs. Basically:
if emacs_server_is_running; then
You're making this too hard. From the the
emacsclient(1) man page:
-a, --alternate-editor=EDITOR if the Emacs server is not running, run the specified editor instead. This can also be specified via the `ALTERNATE_EDITOR' environment variable. If the value of EDITOR is the empty string, then Emacs is started in daemon mode and emacsclient will try to connect to it.