Script needed

Anyone know where I should start when it comes to creating a script that will change SSID, wlan IP Address, and Route Gateway on reboot?

tools/netwatch ?

What is the goal of the script? But if you want to run it anytime that the system is rebooted, have the start time set to “startup” in the scheduler. Then make whatever script you want.

I would like to remotely change the IP address and Route Gateway on a customers RB411 used as a CPE.

I believe I need to change both at the same time or risk being disconnected from the CPE, requiring me to go out to the customer’s premises.

Then you just need to change them within the same scope, which is achieved by either running an actual script or right on the command line by running both on the same line or within curly braces.

/ip address remove 0; /ip address add address=1.1.1.2/24; /ip route set 0 gateway=1.1.1.1

or

{
/ip address remove 0;
/ip address add address=1.1.1.1/24;
/ip route set gateway=1.1.1.1;
}

should work. That allows all necessary commands to be submitted at once and then be executed as one transaction.

fewi,

Thank you for your help!

At first the script didn’t work. It kept removing ether1 Ip address instead of wlan1 Ip address.
So I removed the first line and found that I could just go back in and remove the old wlan1 Ip address later without being disconnect from the radio.


{
/ip address add address=10.12.0.15/24;
/ip route set gateway=10.12.0.1;
}

interface=wlan1
numbers=0


Thanks Again!