mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-06-28 17:00:06 +02:00
Remove unused code; remove sens info; simplified script
This commit is contained in:
parent
04cb8d03a6
commit
2ede2d4b5e
2 changed files with 6 additions and 17 deletions
|
@ -1,14 +1,5 @@
|
||||||
/system script
|
/system package update check-for-updates once; :delay 10s;
|
||||||
add dont-require-permissions=yes name="Alert on New Version" owner=admin source=":delay 60s\
|
|
||||||
\n:global emailAddress \"kpothi@gmail.com\";\
|
|
||||||
\n\
|
|
||||||
\n/system package update;\
|
|
||||||
\ncheck-for-updates once;\
|
|
||||||
\n:delay 10s;\
|
|
||||||
\n\
|
|
||||||
\n:if ( [get status] = \"New version is available\") do=\
|
|
||||||
\n /tool e-mail send to=\"\$emailAddress\" subject=\"[Mikrotik] Software Up \\\
|
|
||||||
\n date Available\" body=\"A new update is available for your MikroTik device\"\
|
|
||||||
\n}\
|
|
||||||
\n"
|
|
||||||
|
|
||||||
|
:if ( [get status] = "New version is available") do={
|
||||||
|
/tool e-mail send to="$emailAddress" subject="[Mikrotik] A new update is available" body="See subject!"
|
||||||
|
}
|
||||||
|
|
|
@ -63,15 +63,13 @@
|
||||||
/ip pool add name=$dhcpName ranges=$dhcpPoolRange;
|
/ip pool add name=$dhcpName ranges=$dhcpPoolRange;
|
||||||
/ip dhcp-server network add address=$mySubnetCIDR gateway=$dhcpServerIP dns-server=$dhcpServerIP;
|
/ip dhcp-server network add address=$mySubnetCIDR gateway=$dhcpServerIP dns-server=$dhcpServerIP;
|
||||||
/ip address add address=$myBridgeAddress interface=bridge;
|
/ip address add address=$myBridgeAddress interface=bridge;
|
||||||
# /ip dhcp-server add name=$dhcpName address-pool=$dhcpName interface=bridge lease-time=10m disabled=no;
|
/ip dhcp-server set [find interface=bridge] address-pool=my-dhcp
|
||||||
/ip dhcp-server set [find name=defconf] address-pool=my-dhcp
|
|
||||||
:put "Subnet changed."
|
:put "Subnet changed."
|
||||||
|
|
||||||
:put "Removing old subnet."
|
:put "Removing old subnet."
|
||||||
:put "This will make the current SSH session unresponsive."
|
:put "This will make the current SSH session unresponsive."
|
||||||
:put "Renew or release the IP in DHCP client in the router or disble & enable DHCP client to make everything work again."
|
:put "Renew or release the IP in DHCP client in the router or disble & enable DHCP client to make everything work again."
|
||||||
/ip pool remove default-dhcp;
|
/ip pool remove default-dhcp;
|
||||||
/ip dhcp-server network remove [find dns-server=192.168.88.1];
|
/ip dhcp-server network remove [find gateway=192.168.88.1];
|
||||||
/ip address remove [find address="192.168.88.1/24"]
|
/ip address remove [find address="192.168.88.1/24"]
|
||||||
# /ip dhcp-server remove defconf;
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue