mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-21 09:35:43 +02:00
28 lines
533 B
Text
28 lines
533 B
Text
# RouterOS Function
|
|
# Copyright (c) Grzegorz Budny
|
|
# Version 1.0
|
|
# Last update: 2/8/2020
|
|
# 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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$LoadScript scriptName=scriptName.rsc;
|
|
|
|
|
|
|