routeros-scripts-main/global-wait.rsc
Christian Hesse cd89dc467d global-wait: fail if global functions do not become ready
Co-authored-by: Ilya Kulakov <kulakov.ilya@gmail.com>
2025-05-05 18:10:17 +02:00

13 lines
445 B
Text

#!rsc by RouterOS
# RouterOS script: global-wait
# Copyright (c) 2020-2025 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.15
#
# wait for global-functions to finish
# https://rsc.eworm.de/doc/global-wait.md
:global GlobalFunctionsReady;
:onerror e { :retry { :if ($GlobalFunctionsReady != true) \
do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; };