Sha256: d0a7076ad8e5214a1c24f43af1c0150b0a85ab8f32bfd0bdc41563c6087fd5a6

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

class TrueNAS < Oxidized::Model
  comment '# '

  cmd('uname -a') { |cfg| comment cfg }
  cmd('cat /etc/version') { |cfg| comment cfg }
  cmd('sqlite3 "file:///data/freenas-v1.db?mode=ro&immutable=1" .dump') do |cfg|
    cfg.lines.reject do |line|
      line.match(/^INSERT INTO storage_replication /) ||
        line.match(/^INSERT INTO system_alert /)
    end.join
  end

  cfg :ssh do
    exec true # don't run shell, run each command in exec channel
  end

  cfg :ssh do
    pre_logout 'exit'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized/model/truenas.rb