[upgrade] reduce line of codes for haproxy restart