Community discussions

MikroTik App
 
iprok
just joined
Topic Author
Posts: 5
Joined: Mon Feb 15, 2016 5:20 pm

Policies needed for automatic upgrade

Wed Jun 22, 2016 3:20 pm

Hello!

I use the script to automate the upgrade process:

      /system package update
       check-for-updates once
       :delay 1s;
       :if ( [get installed-version] != [get latest-version]) do={ install once }
If I set all policies for it and scheduler record, everything is OK. But I want to use as little policies as I can. So I need to get what policies are needed for the script. What of them should be set to the script and what to scheduler records. And the best will be to learn how to get the information in future.
 
infabo
Long time Member
Long time Member
Posts: 585
Joined: Thu Nov 12, 2020 12:07 pm

Re: Policies needed for automatic upgrade

Wed Jul 20, 2022 6:40 pm

I need to bury out this old topic because I want to find out the answer to this question. The documentation about this policy-parameter is kind of unhelpful.

It seems like the following policies are needed at minimum:
  • reboot - "install" performs a reboot after downloading the update-file is complete
  • read - needed for "check-for-updates"?
  • write - allow to install update?
  • policy - to read "get latest-version" / "get installed-version"?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Policies needed for automatic upgrade

Wed Jul 20, 2022 7:46 pm

And I feel compelled to say that self-updating is the biggest bullshit someone can ever do.
It is useless to explain again for the umpteenth time because it should not be done.
Many updates from thousands of manufacturers produced thousands of blocked peripherals per day "0", not only MikroTik...
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3279
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Policies needed for automatic upgrade

Wed Jul 20, 2022 11:34 pm

If you for some reason need to auto upgrade using a script, them make the script check an external web server if a flag is set.
Flag says no, do not upgrade, if flag says yes, then script can upgrade. This to make sure it does not upgrade before you let it do it.
Before you upgrade, test all your different router with a equal router with same config at your local office and make sure all are ok before upgade.

There as been so many things over the years that has broke after upgrade, so just upgrade with out any test are pure stupidness.

Who is online

Users browsing this forum: Cmon169, Qalderu and 25 guests