Fixed template and rc.local to use port specified in userdata or default