Community discussions

 
conrad09
just joined
Topic Author
Posts: 1
Joined: Tue Sep 04, 2018 10:49 pm

Mikrotik add package source script

Tue Sep 04, 2018 11:17 pm

Hi! I need to create script which will add package source, refresh it and then install new version of available package. But command - /system upgrade upgrade-package-source add user=test address=x.x.x.x require to enter password interactively. How i can do it from script?
Script source:

Code: Select all

:local ip x.x.x.x
:local x [/system upgrade upgrade-package-source get number=[find where address=$ip]]
:if ( [:len $x] < 0 ) do={
/system upgrade upgrade-package-source add user=update address=$ip
password
}
/system upgrade refresh
/system upgrade download-all reboot-after-download=yes download-beta=no
Thank you in advance for your response and sorry for my english.

Who is online

Users browsing this forum: No registered users and 14 guests