Yes it runs in a non interactive way since the systemd service is executed as root. I ve tried it on both a RPi 1B and a RPI 3B and it works nice on both of them.
Of cource feel free to include it as a default script. This kind of on-off button is being used in many other applications on RPis since it requries any simple button to work and nothing more.
Of cource feel free to include it as a default script. This kind of on-off button is being used in many other applications on RPis since it requries any simple button to work and nothing more.