The file you should modify is

/etc/rc.button/switch

Now it print some log if you press the button

Fri Jan 20 09:13:24 2023 user.notice gl-switch: switch released
Fri Jan 20 09:13:24 2023 user.notice gl-switch: no config
Fri Jan 20 09:13:24 2023 user.notice gl-switch: switch pressed
Fri Jan 20 09:13:24 2023 user.notice gl-switch: no config

You are supposed to config in cat /etc/config/switch-button but you can modify the above script directly.

1 Like