Wht don't you try gpiozero Button..more flexible....you can add short press reboot,long press shutdown etc
Hello #Mario77... It seems that you are good at Linux coding. I am not that good at Linux/LE, and i have make few changes through SSH, so i know what it is ans so. Today i have Generic AMD/Intel/NVIDIA (x86_64) installed on a PC, and it is connected to a UPS that support it at a power break. My idea was to make a script or so like: "if LAN/ethernet goes down start shutdown.sh" or something like that. Thought there was an "power manager addon" that has a function for my idea, but can not find any. Best regards from Thore in Sweden