mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-12 19:14:28 +02:00
Cosmetic
Headers of files unified.
This commit is contained in:
parent
9914cf5e18
commit
78cac6a07c
18 changed files with 53 additions and 35 deletions
|
@ -1,7 +1,10 @@
|
|||
:global Filename "ch10-04-bad-script.rsc"
|
||||
# filename: ch10-04-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-04-bad-script.rsc"
|
||||
|
||||
# function to log error message
|
||||
:global LogMessageFunc do={
|
||||
:global Filename;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ch10-05-error-check.rsc
|
||||
# filename: ch10-05-error-check.rsc
|
||||
:local WebSites { "badname1234.com"; "google.com"};
|
||||
|
||||
:foreach SiteName in=$WebSites do={
|
||||
:local SiteIpAddress [:resolve $SiteName];
|
||||
:put "Site IP for $SiteName is $SiteIpAddress";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-06-error-check.rsc
|
||||
# filename: ch10-06-error-check.rsc
|
||||
:local WebSites { "badname1234.com"; "google.com"};
|
||||
:foreach SiteName in=$WebSites do={
|
||||
:do {
|
||||
|
@ -7,4 +7,4 @@
|
|||
} on-error={
|
||||
:put "Name lookup failed for $SiteName";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# filename: ch10-07-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-07-bad-script.rsc"
|
||||
# A script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
# function to log error messages
|
||||
:global LogMessageFunc do={
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
:global Filename "ch10-08-bad-script.rsc"
|
||||
# A script to perform a series of tests on a
|
||||
# filename: ch10-08-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-08-bad-script.rsc"
|
||||
|
||||
# set DEBUG to "true" for script debugging output,
|
||||
# "false" for normal operation
|
||||
:global DEBUG false;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ch10-09-simple-pause.rsc
|
||||
# filename: ch10-09-simple-pause.rsc
|
||||
|
||||
# A simple script that includes a 2 second pause
|
||||
|
||||
:put "Hello we're going to pause now...";
|
||||
:delay 2;
|
||||
:put "Pause complete. We're all done now!";
|
||||
:put "Pause complete. We're all done now!";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-10-add-remove-vlans.rsc
|
||||
# filename: ch10-10-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/fromon-error={
|
||||
# a Mikrotik router interface
|
||||
|
@ -24,4 +24,4 @@
|
|||
# add VLAN to LAN interface
|
||||
:local VlanName "VLAN$VlanId";
|
||||
/interface vlan remove "$VlanName";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-11-add-remove-vlans.rsc
|
||||
# filename: ch10-11-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/from
|
||||
# a Mikrotik router interface
|
||||
|
@ -20,4 +20,4 @@
|
|||
# add VLAN to LAN interface
|
||||
:local VlanName "VLAN$VlanId";
|
||||
/interface vlan remove "$VlanName";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-12-add-remove-vlans.rsc
|
||||
# filename: ch10-12-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/from
|
||||
# a Mikrotik router interface
|
||||
|
@ -28,4 +28,4 @@
|
|||
}
|
||||
}];
|
||||
|
||||
:put "Remove loop time: $RemoveLoopTime";
|
||||
:put "Remove loop time: $RemoveLoopTime";
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
:global Filename "ch10-04-bad-script.rsc"
|
||||
# filename: ch10-04-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-04-bad-script.rsc"
|
||||
|
||||
# function to log error message
|
||||
:global LogMessageFunc do={
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ch10-05-error-check.rsc
|
||||
# filename: ch10-05-error-check.rsc
|
||||
:local WebSites { "badname1234.com"; "google.com"};
|
||||
|
||||
:foreach SiteName in=$WebSites do={
|
||||
:local SiteIpAddress [:resolve $SiteName];
|
||||
:put "Site IP for $SiteName is $SiteIpAddress";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-06-error-check.rsc
|
||||
# filename: ch10-06-error-check.rsc
|
||||
:local WebSites { "badname1234.com"; "google.com"};
|
||||
:foreach SiteName in=$WebSites do={
|
||||
:do {
|
||||
|
@ -7,4 +7,4 @@
|
|||
} on-error={
|
||||
:put "Name lookup failed for $SiteName";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# filename: ch10-07-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-07-bad-script.rsc"
|
||||
# A script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
# function to log error messages
|
||||
:global LogMessageFunc do={
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
:global Filename "ch10-08-bad-script.rsc"
|
||||
# A script to perform a series of tests on a
|
||||
# filename: ch10-08-bad-script.rsc
|
||||
#
|
||||
# A simple script to perform a series of tests on a
|
||||
# list of web sites.
|
||||
|
||||
:global Filename "ch10-08-bad-script.rsc"
|
||||
|
||||
# set DEBUG to "true" for script debugging output,
|
||||
# "false" for normal operation
|
||||
:global DEBUG false;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ch10-09-simple-pause.rsc
|
||||
# filename: ch10-09-simple-pause.rsc
|
||||
|
||||
# A simple script that includes a 2 second pause
|
||||
|
||||
:put "Hello we're going to pause now...";
|
||||
:delay 2;
|
||||
:put "Pause complete. We're all done now!";
|
||||
:put "Pause complete. We're all done now!";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-10-add-remove-vlans.rsc
|
||||
# filename: ch10-10-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/from
|
||||
# a Mikrotik router interface
|
||||
|
@ -24,4 +24,4 @@
|
|||
# add VLAN to LAN interface
|
||||
:local VlanName "VLAN$VlanId";
|
||||
/interface/vlan remove "$VlanName";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-11-add-remove-vlans.rsc
|
||||
# filename: ch10-11-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/from
|
||||
# a Mikrotik router interface
|
||||
|
@ -20,4 +20,4 @@
|
|||
# add VLAN to LAN interface
|
||||
:local VlanName "VLAN$VlanId";
|
||||
/interface vlan remove "$VlanName";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ch10-12-add-remove-vlans.rsc
|
||||
# filename: ch10-12-add-remove-vlans.rsc
|
||||
|
||||
# a script to add and remove 50 VLANs to/from
|
||||
# a Mikrotik router interface
|
||||
|
@ -28,4 +28,4 @@
|
|||
}
|
||||
}];
|
||||
|
||||
:put "Remove loop time: $RemoveLoopTime";
|
||||
:put "Remove loop time: $RemoveLoopTime";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue