-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Global include of LUA scripts #11676
Comments
we'd probably take a dir, or a file (plus offering a function to include a dir), instead of handling wildcards here, but that's a detail |
If there are multiple scripts in the directory, the order may matter, which can lead to problems |
Good point. Sorting alphabetically before loading would be a good idea, so one could prefix files with e.g. "00-" to "99-" to fix the order. |
My intention was to use a wildcard to give the admin a configurable possibility to only use files with a given extension. If including a directory, only files with names ending in |
This is especially important in case this feature leads to LUA files as extension packages. For the example described above I could think of an RPM package |
yes! |
I'm looking to do something exactly like this. Currently using recursor as it can reference lua files which has over 100 lines of code but running into issues with Google due to no AA bit. Reading this, it seems all lua is supported (e.f. preresolve) in authorative but without this feature I need to insert row by row in between ""? |
you can already use |
Thank you for confirming. That's good news, so I can use the full lua script in a lua records on pdns Authoritative and use in the record? |
Description
Please add a feature to authoritative server that allows a common LUA script to be loaded when the server starts.
Primary use case
Creating new LUA functions that work just like the built-in functions.
Example
Switch RR value on a given time for a planned migration scenario.
Solution A so far
Zone:
Solution B so far
Zone:
Proposed solution with new feature
/etc/pdns/pdns.conf:
/etc/pdns/common-lua.d/switchontime.lua
Zone:
The text was updated successfully, but these errors were encountered: