Is it possible to provision new CPE routerboards using netinstall/flashfig and upload a custom webfig skin at the same time?
I figured out how to provision the configuration part, but don’t see how files can be transferred easily without having to log into the router after flashfig. I guess it’s possible with /tool fetch in the setup script, but I was hoping for a simpler, one-shot solution.
I needed same thing and failed.
Reason is (IMHO), flashfig is not running as admin, but “*sys” - which has lower privileges. This is not enough to download .json file from ftp server.
How to reproduce:
create skin.json (in WebFig) and upload it to FTP server
rename it to skin.txt and upload it to FTP again
create flashfig.rsc script which activates internet connection and at end add:
I tried to upload and run script via tr069-client - but this is run as user “*sys” too.
I tried fetch txt file and store it (dst-path) as json - without success.
I tried to elevate “*sys” priviledges via ssh to localhost as admin - without success (“*sys” can’t run ssh client?).
I can’t find method to copy/rename/move txt file to json in Mikrotik.
If router is not behind NAT, there can be solution: fetch php script from server which connect (from web server) back to router as admin and downloads nedded json. Problem is NAT.
Is any real solution to provide webfig skin via automatic provisioning?