I think this is no good.  If fail2ban is already running I think this will delete the socket of the running process and then try to start a second.  Also, we've moved to using fail2ban -x start instead of manually deleting the socket.  I think you need to check for /var/lock/subsys/fail2ban and do not start if that exists if there is no other way of determining whether or not fail2ban in running in the container.