Readme file and update channel parameter fixed.

This commit is contained in:
Alexander Beeyev 2019-08-05 17:10:39 +03:00
parent 207090873a
commit a7734dfcf9
2 changed files with 9 additions and 7 deletions

View file

@ -1,17 +1,18 @@
# Mikrotik Firmware Auto Updater # Mikrotik Firmware Auto Updater
Script automatically updates router to the latest firmware. The script automatically updates the router to the latest firmware.
When script finds new uptate it sends email notification that upgrade process has started, system backup and config file are in attachment. After firmware and routerboard got updated, it sends second email which tells that upgrade process has been finished. When script finds new update it sends an email notification that upgrade process has started, system backup and config file are in the attachment. After firmware and routerboard got updated, it sends the second email which tells that upgrade process finished.
## How to use ## How to use
##### 1. Create new script ##### 1. Create new script
System -> Scripts [Add] System -> Scripts [Add]
**Imprtant! ** Script name has to be **firmware-updater**
Put script source and **set your email address** to the variable *emailAddress* **Imprtant!** Script name has to be `firmware-updater`
Put script source and **set your email address** to the variable `emailAddress`
![](https://github.com/beeyev/Mikrotik-Firmware-Auto-Updater/raw/master/howto/script-name.png) ![](https://github.com/beeyev/Mikrotik-Firmware-Auto-Updater/raw/master/howto/script-name.png)
##### 2. Configure mail server ##### 2. Configure mail server
Tools -> Email Tools -> Email
Set your email server parameters. If you don't have one, i recommend to use [smtp2go.com](https://smtp2go.com "smtp2go.com") service, it allows to send thousand emails per month for free. Set your email server parameters. If you don't have one, i recommend to use [smtp2go.com](https://smtp2go.com "smtp2go.com") service, it allows sending a thousand emails per month for free.
![](https://github.com/beeyev/Mikrotik-Firmware-Auto-Updater/raw/master/howto/email-config.png) ![](https://github.com/beeyev/Mikrotik-Firmware-Auto-Updater/raw/master/howto/email-config.png)
##### 3. Create scheduled task ##### 3. Create scheduled task

View file

@ -11,11 +11,11 @@
## If true, passwords will be included in exported config ## If true, passwords will be included in exported config
:local sensetiveDataInConfig false; :local sensetiveDataInConfig false;
## Update channel. Possible values: current, bugfix ## Update channel. Possible values: stable, long-term
:local updateChannel "stable"; :local updateChannel "stable";
## Install only patch versions of firmware updates. ## Install only patch versions of firmware updates.
## Means that new update will be installed only if major and minor version numbers are same as currently installed firmware. ## Means that new update will be installed only if major and minor version numbers are the same as currently installed firmware.
## Example: v6.43.6 => major.minor.PATCH ## Example: v6.43.6 => major.minor.PATCH
:local onlyPatchUpdates false; :local onlyPatchUpdates false;
########## ##########
@ -110,6 +110,7 @@
} }
} }
log info ("Checking for new firmware version. Current version is: $osVerCurrent"); log info ("Checking for new firmware version. Current version is: $osVerCurrent");
/system package update set channel=$updateChannel;
/system package update check-for-updates; /system package update check-for-updates;
:delay 5s; :delay 5s;