Load valid key/value lines from a readable config file.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_cfg_load_file

Purpose

Load valid key/value lines from a readable config file.

Arguments

  • $1 — Path to file; unreadable files are ignored.

Side effects

Sets valid shell variables without evaluating the values as shell code.

Returns

0 after processing, including when the file is missing.

Usage

  sgnd_cfg_load_file "/etc/solidgroundux/sample.cfg"