[NesPi case] Script for full shutdown?

Could you clarify exactly what you want to do. If you simply want to power off OSMC, you could try running the command poweroff from a shell script, assuming that you can get it to run in the first place.

The raspi-gpio commands might not all work because the OSMC kernel has been built for running a media server, whereas Raspbian is a general-purpose system with a strong educational emphasis. Please take a look at OSMC raspDAC overlays gpio-shutdown pin 17 &22 for an example of what I’m talking about.