capsman wireless standalone flip script asked

Hi, anyone can help me?
I’m fairly good with Mikrotik, although not so good with scripting.
Can anyone provide me with an (example) script, that flips the wireless settings on a hap ac lite?

Situation:

  • i use capsman extensively on my house/campus
  • i have a steel boat that lies alongside my house
  • on the outside of the boat a wireless accessoint connects as client ap to my wifi network in the house
  • in the steel boat i have a hap ac lite, that connects to my caps manager (192.168.129.254) in my house

In summer i want to go on vacation with the boat

  • when i sail to a harbour, the outside client ap connects to the harbour wifi network
  • the inside hap ac lite will obviously not find the capsmanager then and needs to provide standalone wireless network
  • in wireless settings this can easily be arranged by enabling/disabling CAP for the wireless interface: if cap = enabled, wireless is provided by capsmanager, if not, local wireless settings become active
  • i really would like to have a script on the hap ac lite, that polls whether the capsmanager can be found (e.g. ping 192.168.129.254 and work with the result) , and if found: wireless interface cap = enabled, otherwise wireless interface cap = disabled
  • in case of disable, local wireless settings will be advertised by the hap ac

anyone? plz? much appreciated!
MT rules! :wink:

UPDATE: Wasn’t sure whether to post here or in scripting section, so did both… will remove when answer is provided.

KR, Eric

@all,

post can be closed here, since answers arrive in the scripting section, already.
thx for thinking with me.