# AX1800 Sync Button Config

**URL:** <https://forum.gl-inet.com/t/ax1800-sync-button-config/53202>\
**Category:** Router\
**Created:** [January 14, 2025, 4:47pm UTC](https://forum.gl-inet.com/t/ax1800-sync-button-config/53202 "2025-01-14T16:47:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_linoleum](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/_/df705f/32.png) [@\_linoleum](https://forum.gl-inet.com/u/_linoleum)\
**Post date:** [January 14, 2025, 4:47pm UTC](https://forum.gl-inet.com/t/ax1800-sync-button-config/53202/1 "2025-01-14T16:47:33Z")

</div>

Model AX1800. Firmware 4.6.8, kernel 4.4.60.

I started to open this asking for help but as I started to gather info, I figured out the problem. Since I couldn't find any threads on this, I'm going to put this here to help others.

What to do: have sync button run custom script.

How to do it:

1. Create executable (`chmod +x`) sh file in: `/etc/gl-switch.d/`. It should follow the same format as the other files in that folder. You need to define `$action` or it won't work. Add a `logger` message so you can reference your logs.
2. Test the script: `/etc/gl-switch.d/your-script.sh on`  
You should see your `logger` output.
3. To make the change to the button config, run:  
`uci set switch-button.@main[0].func="your-script"`  
`uci commit switch-button`  
No output should mean it worked.
4. Test by pressing your button

Before configuring this, the logs say:  
Tue Jan 14 10:35:11 2025 user.notice gl-switch: switch released  
Tue Jan 14 10:35:11 2025 user.notice gl-switch: no config  
Tue Jan 14 10:35:11 2025 user.notice gl-switch: switch pressed  
Tue Jan 14 10:35:11 2025 user.notice gl-switch: no config

That's about it. Wish I found this post a few hours ago! 🙂  
If anyone notices any issues with this config, please reply!

---

<div class="post-metadata">

**Author:** ![system](https://forum-static.gl-inet.com/original/3X/7/7/77e28f6cb342ac4bd641bd9a6254595d61b2812a.png) [@system](https://forum.gl-inet.com/u/system)\
**Post date:** [July 13, 2025, 4:47pm UTC](https://forum.gl-inet.com/t/ax1800-sync-button-config/53202/2 "2025-07-13T16:47:57Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
