From 26e471122f029b8e585e1e88e5f2fdaa1f21abd7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 16 Nov 2021 16:03:56 +0100 Subject: [PATCH] add doc/mod/scriptrunonce --- README.md | 1 + doc/mod/scriptrunonce.d/hello-world.rsc | 3 ++ doc/mod/scriptrunonce.d/scriptrunonce.avif | Bin 0 -> 2466 bytes doc/mod/scriptrunonce.md | 35 +++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 doc/mod/scriptrunonce.d/hello-world.rsc create mode 100644 doc/mod/scriptrunonce.d/scriptrunonce.avif create mode 100644 doc/mod/scriptrunonce.md diff --git a/README.md b/README.md index 752f5e8..a3da7e7 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,7 @@ Available modules * [IP address calculation](doc/mod/ipcalc.md) * [Send notifications via Matrix](doc/mod/notification-matrix.md) * [Send notifications via Telegram](doc/mod/notification-telegram.md) +* [Download script and run it once](doc/mod/scriptrunonce.md) Contact ------- diff --git a/doc/mod/scriptrunonce.d/hello-world.rsc b/doc/mod/scriptrunonce.d/hello-world.rsc new file mode 100644 index 0000000..17ec575 --- /dev/null +++ b/doc/mod/scriptrunonce.d/hello-world.rsc @@ -0,0 +1,3 @@ +#!rsc by RouterOS + +:put ("Hello World from " . [ / system identity get name ] . "!"); diff --git a/doc/mod/scriptrunonce.d/scriptrunonce.avif b/doc/mod/scriptrunonce.d/scriptrunonce.avif new file mode 100644 index 0000000000000000000000000000000000000000..614c72c670ff87f31bbd59d11c73927d62630129 GIT binary patch literal 2466 zcmXw4c{mh$7oH(Y_9aPnV_&MtSYnv0V;PsR6(h{G%`lU(j}V5)I>{1|ExshXB(6qw zC1b0|mXPJMRTyLK8-33`=lPxYocBG?Ip@D0005Bk4h|=vL$TffhMgiF>kYG72xI(`H5wI`j(I$RFqbXQeNe5J+I~mRN#^KLgKU zg9u)yjQ{|%EF;)69v=Zq#QtH}+1VM$g$@N9#Y&wr06`CbT;OdF9FZ}Z8^9XFpoFmm z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j#o#1inLecVZ66bkk}Z-AE@`2Ku(?^?{R>>ibnAib`&x?^ zUNL&nVX<64{q(v#Cb}NqeL=}YZ!o`7DYgB4&l#aM;A7NaE1TA_l6(#x`Gg5p`6<4% z#7*L+kysUiKsn;JW% z^_1hI>_v3s!>A^g^CBP0Mu|f5O-P)^YhzvTu~0i`@`c~&ZNDM; z&MMmmPz!yWn`WUs#Ho;bBzPZ=w} zSPNhF1O;U^oAxe>)aBM_SpoEmx;YD>IgZ;x&>*(j@a1<-A-eG**R=Jg6NGOoJ`Lvc zGk%jLyhkw`@Ij;(YzVIMG>gR3vf$I-A5F}<-kYM!e$bW?(g-_g{C3X3#246+H*TkA TP0`4OjfKTV!F_r)V0HfktQ2I! literal 0 HcmV?d00001 diff --git a/doc/mod/scriptrunonce.md b/doc/mod/scriptrunonce.md new file mode 100644 index 0000000..190ed03 --- /dev/null +++ b/doc/mod/scriptrunonce.md @@ -0,0 +1,35 @@ +Download script and run it once +=============================== + +[◀ Go back to main README](../../README.md) + +> ℹ️️ **Info**: This module can not be used on its own but requires the base +> installation. See [main README](../../README.md) for details. + +Description +----------- + +This module adds a function that downloads a script, checks for syntax +validity and runs it once. + +Requirements and installation +----------------------------- + +Just install the module: + + $ScriptInstallUpdate mod/scriptrunonce; + +Usage and invocation +-------------------- + +The function `$ScriptRunOnce` expects an url pointing to a script as parameter. + + $ScriptRunOnce https://git.eworm.de/cgit/routeros-scripts/plain/doc/mod/scriptrunonce.d/hello-world.rsc + +![ScriptRunOnce](scriptrunonce.d/scriptrunonce.avif) + +Giving multiple scripts is possible, separated by comma. + +--- +[◀ Go back to main README](../../README.md) +[▲ Go back to top](#top)