mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 10:04:19 +02:00
README: installing custom scripts & modules
This commit is contained in:
parent
7189a3bbe5
commit
ecde864263
BIN
README.d/12-install-custom-script.avif
Normal file
BIN
README.d/12-install-custom-script.avif
Normal file
Binary file not shown.
3
README.d/hello-world.rsc
Normal file
3
README.d/hello-world.rsc
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!rsc by RouterOS
|
||||
|
||||
:put ("Hello World from " . [ / system identity get name ] . "!");
|
23
README.md
23
README.md
|
@ -231,6 +231,29 @@ Available modules
|
|||
* [Send notifications via Telegram](doc/mod/notification-telegram.md)
|
||||
* [Download script and run it once](doc/mod/scriptrunonce.md)
|
||||
|
||||
Installing custom scripts & modules
|
||||
-----------------------------------
|
||||
|
||||
My scripts cover a lot of use cases, but you may have your own ones. You can
|
||||
still use my scripts to manage and deploy yours, by specifying `base-url`
|
||||
(and `url-suffix`) for each script.
|
||||
|
||||
This will fetch and install a script `hello-world.rsc` from the given url:
|
||||
|
||||
$ScriptInstallUpdate hello-world.rsc "base-url=https://git.eworm.de/cgit/routeros-scripts/plain/README.d/"
|
||||
|
||||
![screenshot: install custom script](README.d/12-install-custom-script.avif)
|
||||
|
||||
(Yes, the example url still belongs to the repository for easy
|
||||
handling - but the url can be what ever you use.)
|
||||
|
||||
For a script to be considered valid it has to begin with a *magic token*.
|
||||
Have a look at [any script](README.d/hello-world.rsc) and copy the first line
|
||||
without modification.
|
||||
|
||||
Starting a script's name with `mod/` makes it a module and it is run
|
||||
automatically by `global-functions`.
|
||||
|
||||
Contact
|
||||
-------
|
||||
|
||||
|
|
Loading…
Reference in a new issue