[Request] Official documentation/support for custom Toggle Button scripts

There already exists support to run custom scripts when switching the Toggle Button on/off on routers with that button by placing an executable script in /etc/gl-switch.d/. Then the user can use uci to set switch-button.@main[0].func to the name of that script, or even use the official UI to select that value in the drop-down.

However, this is not documented at all in the Toggle Button docs. My request is for this to be officially documented, because:

  1. Documentation lets users know about this customization. I was going to request this feature before realizing it already exists!
  2. Official documentation would indicate that this feature will be supported going forwards, which lets users feel comfortable using it without worrying if an update will silently remove support for it.

Hi,

Thank you for sharing your findings and suggestion.

At present, the Toggle Button in the Web Admin Panel mainly provides several predefined functions. For other custom actions, users can configure their own scripts manually, however this is a more advanced setup and generally requires some familiarity with OpenWrt/Linux and the related system configuration.

We have recorded your suggestion to add official documentation for custom Toggle Button scripts and will forward it to the relevant team for further evaluation.

Thank you again for your feedback and contribution to the community.