#!/bin/sh## Script inspired by https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense-checkmk/blob/main/files/firmware_status.py#installed_version=$(/usr/local/sbin/opnsense-version -v | cut -d'_' -f1)# Fetch the most recent version from the changelogmost_recent_version=$(tail -n 2 /usr/local/opnsense/changelog/index.json | tr -d '\n' | grep -o '"version":"[^"]*' | awk -F '"' '{print $4}' | tail -n 1)if [ "$installed_version" != "$most_recent_version" ]; then update_available=trueelse update_available=falsefiecho "$update_available"
extend SystemUpdateAvailable /root/UpdateStatusSNMP.sh
snmpwalk -c public -v 2c 127.0.0.1 nsExtendOutLine
snmptranslate -On NET-SNMP-EXTEND-MIB::nsExtendOutLine
snmpwalk -c public -v 2c -On 127.0.0.1 .1.3.6.1.4.1.8072.1.3.2.4.1.2.1.3.6.1.4.1.8072.1.3.2.4.1.2.21.83.121.115.116.101.109.85.112.100.97.116.101.65.118.97.105.108.97.98.108.101.1 = STRING: false