How to run script when settings are applied

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
Veole
DD-WRT Novice


Joined: 06 Oct 2018
Posts: 20

PostPosted: Wed Jan 24, 2024 19:51    Post subject: How to run script when settings are applied Reply with quote
Code:
gpio disable <number>


I run a startup script to disable leds. After pressing "apply" in the web interface, the leds turn on again. After upgrading the firmware, it does not even work at startup (it turns the leds off and again on; the leds stayed off before).

Thanks!
Sponsor
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1889

PostPosted: Wed Jan 24, 2024 20:06    Post subject: Reply with quote
Is this on your Buffalo or some other router? On what build? You could test putting it in the firewall script - "Save As Firewall" on the Administration -> Commands tab. It could also be that the gpio bits were disabled, who knows. Does it work from ssh/telnet CLI?
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Veole
DD-WRT Novice


Joined: 06 Oct 2018
Posts: 20

PostPosted: Wed Jan 24, 2024 20:33    Post subject: Reply with quote
It works from telnet as usual, but now it behaves at startup like I'm pressing "apply". Save as firewall does not work.

Code:
sleep 30; gpio disable <number>


This code works at startup. Which means I was right, the router turns leds on (resets its default setting) everytime it applies settings (manually or at boot). In other builds the startup script was run after all settings were applied, so the leds stayed off.

Anyway, the question is the same. Is it possible to run the gpio script when it detects:
1. that leds are turned on?
2. that settings are manually applied in the web interface?
3. that the router is idle at boot (all startup settings are applied)?

Thanks!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum