jetson tx2 button down button

We would like to detect when Jetson tx2 power down button is pressed. Currently when pressed Ubuntu does not shutdown the system but displays a menu of options (power down, cancel …etc).
We would like the system to shutdown all services and then power down instead of displaying the menu.
Is there a way to do this easily?

Wrong forum. Moving this topic to the Jetson TX2 forum.