OPNsense Forum

English Forums => Development and Code Review => Topic started by: mihak on March 21, 2021, 06:43:53 PM

Title: Reading from (and writing to) /conf/config.xml
Post by: mihak on March 21, 2021, 06:43:53 PM
I saw several methods used across front-end and backend packages how configuration is read and written to config.xml


Is there (documented?) reviewed and recommended approach for all devs how to read from and write to config.xml? On front-end I would appreciate guidance on php and js patterns for read/write, on the backend at least a read/write pattern for shell scripting and Python.


Or is the recommended approach to use API and CLI exclusively and not ever even think about config.xml directly?