coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

Add 'event' type to script as arg1 #197

Closed gbaligh closed 8 years ago

gbaligh commented 8 years ago

When executing a given script for a specific event, ipup/ipdown or macup/macdown or connup/conndown, the first argument passed will be a string representing the event accured:

Signed-off-by: Baligh GUESMI

wlanmac commented 8 years ago

An issue I have with this change is that it breaks existing configurations (until they adjust their scripts). Given the scripts for each "event" are individually configured (and I'm assuming you want to just use one script), then you can have individual scripts like _script.sh call all-in-one_script.sh should you desire. Alternately, maybe add EVENT= to the environment of the script.

gbaligh commented 8 years ago

Ok, no problem. My need is to send the event from one Box to another using socat. Just as you say, I can use a script for each event, but I thought that it'll be nicer to have the "event-type" from coova-chilli directly. What do you suggest, close this pull ? or update it to add EVENT to the environment of the script (nice idea) ?