This commit is contained in:
Grzegorz Budny 2019-07-29 16:06:09 +02:00
parent dfe83dbb50
commit 411006a7a5
2 changed files with 8 additions and 3 deletions

23
RouterOS_Load_Script.rsc Normal file
View 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;