https://www.luisllamas.es/como-apagar-o-reiniciar-correctamente-raspberry-pi/
How to properly shut down or restart Raspberry Pi