mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 10:14:56 +02:00
netwatch-notify: $NetwatchNotifyHook: rename variable: $Type -> $State
This commit is contained in:
parent
a7c9444545
commit
f50d155500
1 changed files with 6 additions and 6 deletions
|
@ -21,9 +21,9 @@
|
|||
:global SymbolForNotification;
|
||||
|
||||
:local NetwatchNotifyHook do={
|
||||
:local Name [ :tostr $1 ];
|
||||
:local Type [ :tostr $2 ];
|
||||
:local Hook [ :tostr $3 ];
|
||||
:local Name [ :tostr $1 ];
|
||||
:local State [ :tostr $2 ];
|
||||
:local Hook [ :tostr $3 ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global ValidateSyntax;
|
||||
|
@ -32,15 +32,15 @@
|
|||
:do {
|
||||
[ :parse $Hook ];
|
||||
} on-error={
|
||||
$LogPrintExit2 warning $0 ("The " . $Type . "-hook for host " . $Name . " failed to run.") false;
|
||||
$LogPrintExit2 warning $0 ("The " . $State . "-hook for host " . $Name . " failed to run.") false;
|
||||
:return ("The hook failed to run.");
|
||||
}
|
||||
} else={
|
||||
$LogPrintExit2 warning $0 ("The " . $Type . "-hook for host " . $Name . " failed syntax validation.") false;
|
||||
$LogPrintExit2 warning $0 ("The " . $State . "-hook for host " . $Name . " failed syntax validation.") false;
|
||||
:return ("The hook failed syntax validation.");
|
||||
}
|
||||
|
||||
$LogPrintExit2 info $0 ("Ran hook on host " . $Name . " " . $Type . ": " . $Hook) false;
|
||||
$LogPrintExit2 info $0 ("Ran hook on host " . $Name . " " . $State . ": " . $Hook) false;
|
||||
:return ("Ran hook:\n" . $Hook);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue