Generate config files from 'conf.d' like directories
Project description
Generate config files from conf.d like directories.
Split your config file into smaller files in a conf.d like directory. The generated config file will be the concatenation of all splitted config files (also called snippets). The spplited files will be merged in the lexical order of their names.
Files ending with .bak, .old and other similar terminations will be ignored.
This project was based in the update-conf.d project.
Install
This project requires Python 2.6 or newer.
PS: It’s possible to use Python 3 also. However, it is not well tested.
In Ubuntu/Debian:
apt-get install python
To install:
pip install update-conf.py
It’s possible to clone the project in Github and install it via setuptools:
git clone git@github.com:rarylson/update-conf.py.git
cd update-conf.py
python setup.py install
Usage
If you run:
update-conf.py -f /etc/snmp/snmpd.conf
The script will merge the splitted config files in the directory /etc/snmp/snmpd.conf.d into the file /etc/snmp/snmpd.conf.
If the directory containing the splitted files uses a diferent name pattern, you can pass its name as an argument:
update-conf.py -f /etc/snmp/snmpd.conf -d /etc/snmp/snmpd.d
It’s also possible to define frequent used options in a config file (/etc/update-conf.py.conf). For example:
[snmpd]
file = /etc/snmp/snmpd.conf
dir = /etc/snmp/snmpd.d
Now, you can run:
update-conf.py -n snmpd
To get help:
update-conf.py --help
License
This software is released under the Revised BSD License.
Changelog
You can see the changelog here.
TODO
Publish this software in a Ubuntu PPA;
Ubuntu 12.04 and Ubuntu 14.04.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for update_conf.py-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e7b24e528275d4c5f3b4634e9bedf08a480b0e45f4b638824ea978e4ba07f08 |
|
MD5 | 5693d8ef556a9d991c7a9c0a1e37a04e |
|
BLAKE2b-256 | d467df7e7c9de43a5b93611e5d0b9ea3680ae229c5e3bf7b5f494f8e7bf7bff8 |