mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-24 10:48:42 +02:00
Update
This commit is contained in:
parent
dfe83dbb50
commit
411006a7a5
2 changed files with 8 additions and 3 deletions
23
RouterOS_Load_Script.rsc
Normal file
23
RouterOS_Load_Script.rsc
Normal file
|
@ -0,0 +1,23 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Loads function to RouterOS environment
|
||||
|
||||
:global LoadScript do={
|
||||
|
||||
|
||||
:if ([:len [/file find name=$scriptName]] <= 0) do={
|
||||
:log info ($scriptName." not found, make sure file exists!");
|
||||
}
|
||||
|
||||
:if ([:len [/file find name=$scriptName]] > 0) do={
|
||||
:log info ($scriptName." found. Executing!");
|
||||
/system script run $scriptName;
|
||||
:log info ($scriptName." loaded to environment");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$LoadScript scriptName=testScript.rsc;
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue