I am working on a script that goes through the DHCP leases. When it finds a new lease, it creates a static DNS entry for the machine, and sends an email. The script is originally based on https://www.ctrl.blog/entry/routeros-dh ... cript.html.
The script works (DNS updated, email sent) when I run it manually as the admin, with
Code: Select all
> /system script run dhcp-to-dns
* read, to read DHCP leases and static DNS entries
* write, to update static DNS entries
Those policies are both setup for the script itself, as well as the scheduler entry
Code: Select all
> :put [/system script get dhcp-to-dns policy ]
read;write
> :put [/system scheduler get dhcp-to-dns policy ]
read;write
So, two questions:
1. Is there a way to get a better log output when a script dies because it doesn't have permission to run a particular command?
2. What is the policy required for scripts to be able to send emails?
Thanks in advance.