Hi guys,
I’m hoping someone has an idea on this one. I haven’t seen anything on the boards for it, maybe I’m phrasing it wrong?
Here’s the deal:
I’ve got a LOT of mikrotik devices. I am hoping there’s a way to configure them all at once. For instance, I would just like to change the NTP servers, or what services are enabled, or the remote logging destination, on all my mikrotik devices at once, instead of dealing with them individually.
interesting question: will .auto.npk/.auto.rsc auto-execute in case you do not upload via ftp but download it via /tool fetch? =) just cannot test right now
just tested: neither ‘/tool fetch’, nor drag’n’drop via WinBox do not execute *.auto.rsc files. you should still run ‘/import bla-bla-bla.auto.rsc’
even more: when I upload test.auto.rsc via FTP, it creates empty test.auto.log, and executes nothing. tested with ‘:log info “it works!”’ and ‘/ip address add ***’ commands. but after executing ‘/import test.auto.rsc’ command, both test files do what they have to do. some kind of problem with policy in the light of recent changes in default policy for scripts/scheduler? MT Staff, please recheck =)
13:34:56 system,info,account user admin logged in from 192.168.88.254 via ftp
13:34:56 script,info it works!
13:36:18 system,info,account user admin logged out from 192.168.88.254 via ftp
Opening script file test.auto.rsc
Script file loaded successfully
Script file loaded and executed successfully
hmmm… it seems like it’s working only immediately after connectiong to ftp…
13:56:28 system,info,account user admin logged in from 192.168.16.85 via ftp
13:56:59 system,info,account user admin logged out from 192.168.16.85 via ftp
on x86? just tested with FAR File Manager as FTP client - the same thing, it executes uploaded script a few times after connecting to FTP, then begins to create empty log file even after reconnect…
ADDED: wow! when I copy the file again and overwrite previous one - it executes normally! some kind of trying to execute not fully uploaded file?..
This seems more likely to happen if one of these *.auto.rsc scripts is uploaded that takes a while and then it is re-uploaded while the first one was running. Then let the second uploaded script complete, deleting the rsc and log file and re-uploading a third copy seems to not run. Something like that. Confirmed this with both my mac command line client which uses passive mode by default and windows command line client.
To put windows ftp client into passive mode enter ‘literal pasv’ at the prompt.