Skip to content

Commit

Permalink
configd - support optional configd config additions. This can for exa…
Browse files Browse the repository at this point in the history
…mple be used to enforce a custom proxy or overwrite default settings specified in configd.conf

Additions may be written inside opnsense/service/conf/configd.conf.d/ using a name ending in .conf

Another use-case it to "lock-down" configd access by default using a newly default action, e.g.:

[action_defaults]
allowed_groups = wheel
  • Loading branch information
AdSchellevis committed Dec 14, 2023
1 parent 3e49c33 commit a1b0dd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Empty file.
6 changes: 5 additions & 1 deletion src/opnsense/service/configd.py
Expand Up @@ -32,6 +32,7 @@
function: delivers a process coordinator to handle frontend functions
"""

import glob
import os
import sys
import logging
Expand All @@ -58,7 +59,10 @@ def get_config():
"""
cnf = ConfigParser()
cnf.optionxform = str
cnf.read('conf/configd.conf')
configs = ['conf/configd.conf']
for filename in glob.glob('conf/configd.conf.d/*.conf'):
configs.append(filename)
cnf.read(configs)
return cnf


Expand Down

0 comments on commit a1b0dd8

Please sign in to comment.