Correctly redirect stderr to stdout
#!/bin/bash
-lsof -i :<%= p('cf_mysql.broker.port') %> 2>&1 >> /dev/null
+lsof -i :<%= p('cf_mysql.broker.port') %> >> /dev/null 2>&1
EXIT_CODE=$?
if [[ $EXIT_CODE -eq 0 ]]; then
echo 1
