Sha256: d6cee258ad95df0c8bd69c9abd92bc69a3c6d5420ebb0f35accd8d2c336d669e
Contents?: true
Size: 995 Bytes
Versions: 3
Compression:
Stored size: 995 Bytes
Contents
class OpnSense < Oxidized::Model using Refinements # minimum required permissions: "System: Shell account access" # must enable SSH and password-based SSH access cmd 'cat /conf/config.xml' do |cfg| cfg.gsub! /\s<revision>\s*<time>\d*<\/time>\s*.*\s*.*\s*<\/revision>/, '' cfg.gsub! /\s<last_rule_upd_time>\d*<\/last_rule_upd_time>/, '' cfg end # The comment output has to be at the end since and XML file may not start # with a comment. # This gets the version using the opnsense-version command, or from the # /usr/local/opnsense/version/opnsense file for earlier versions of OPNsense # that lack the opnsense-version command. Newer versions of OPNsense no longer # store the version information in this file, so both versions have to be # supported here for now. cmd 'opnsense-version || echo "OPNsense "`cat /usr/local/opnsense/version/opnsense`' do |version| xmlcomment version end cfg :ssh do exec true pre_logout 'exit' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.31.0 | lib/oxidized/model/opnsense.rb |
oxidized-0.30.1 | lib/oxidized/model/opnsense.rb |
oxidized-0.30.0 | lib/oxidized/model/opnsense.rb |