It's actually more simple than that.

```
abort unless system(redis, ping, etc)
```

Redis prints a message to stderr if it fails with an appropriate error message. I can just replace it with that if that works. Example:

```
jsternberg@laptop:[~/gitlab-shell] $ ./bin/check
Check GitLab API access: OK
Check directories and files:
        /home/jsternberg/repositories: OK
        /home/jsternberg/.ssh/authorized_keys2: OK
Testing redis-cli executable: redis-cli 2.6.15
Sending ping to redis server: Could not connect to Redis at 127.0.0.1:6379: Connection refused
```