add ports 3011 and 3012 for tcp-based application
add more checks
add restart option