OpenInternet / copilot

An easy to use censorship simulating access point in a box
https://openinternet.github.io/copilot/
GNU Lesser General Public License v3.0
26 stars 2 forks source link

The watch_config script should directly query plugins to make configuration easier. #121

Open seamustuohy opened 8 years ago

seamustuohy commented 8 years ago

The watch_config script currently has the config files to watch, and their corresponding hard coded.It should directly query plugins to make adding a file to watch for a new plugin easier.

Something like the following where get_config_pairs is a function that creates a namedTuple from a config file or set of environment variables.

plugins = get_config_pairs(os.environ['COPILOT_PLUGIN_DIR'])
for plugin in plugins:
    config_handle.add_config(plugin.conf_file, plugin.service_name)
seamustuohy commented 8 years ago

This should query the plugin directory environment variable defined in issue #124 .