Scheme of connetion Button & LED to Raspberry Pi GPIO pins.

Raspberry Pi by default has no power-off button and proper shutdown system require use the cli-command or using gui interface.
Resolve this problem may with adding the button between GPIO3 (Physical pin 5) and GND (Physical pin 6).
Also may add Raspberry Pi activity indication with adding LED betweet TXD (Physical pin 8) and GND (Physical pin 6).
Installation of script required.