Is there a equivalent for "/usr/local/bin/freenas-update" or a possibility to check update via cli

Ovrld

Cadet
Joined
Aug 21, 2023
Messages
6
Hey guys

I switched from Core to Scale and want to translate the update script I wrote for CheckMK to Scale. Is there a equivalent for "/usr/local/bin/freenas-update" or another possibility to Check for updates on the CLI?

Greetz
Ovrld
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Do you mean this? :

Code:
root@scale2[~]# cli
[scale2]> system
Type "ls" (followed by Enter) to list available system configuration options
Type "man" (followed by Action) to get help on how to use the specific Action.

i.e.
    man boot_id
[scale2] system> update
Type "ls" (followed by Enter) to list available system update configuration options
Type "man" (followed by Action) to get help on how to use the specific Action.

i.e.
    man check_available
[scale2] system update> ls
check_available   - Checks if there is an update available from update server
download          - Download updates using selected train
file              - Updates the system using the uploaded
get_auto_download - Returns if update auto-download is enabled
get_pending       - Gets a list of packages already downloaded and ready to be applied
get_trains        - Returns available trains dict and the currently configured train as well as the train of currently booted environment
manual            - Update the system using a manual update file
set_auto_download - Sets if update auto-download is enabled
set_train         - Set an update train to be used by default in updates
update            - Downloads (if not already in cache) and apply an update



Looks like you would be using system update check_available
 

Ovrld

Cadet
Joined
Aug 21, 2023
Messages
6
Yeah, I already found this, but I hope there is a better solution to use easily in scripts
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So you mean the API call then?

midclt call update.check_available
 
Top