You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Paul Schaub b94b71cd87
Add note about breaking hard links
5 years ago
LICENSE Initial commit 5 years ago Add note about breaking hard links 5 years ago
lincon Initial commit 5 years ago

Lincon - Link config files into a repository

Lincon is a script that helps you to manage configuration files of linux machines using a versioning system (like git).

Its two main functions are adding existing config files to your repository structure and deploying files from your repository to the system.

Lincon does NOT handle versioning for you. You could use git for example.


To get started, create your config repository and copy the lincon script into it. In the following examples we assume that your repo is located in /home/user/configs.

Whenever you want to execute an operation with lincon, make sure that you are in your repositories root.

In order to add an existing config file to your repo, just call

$ ./lincon add /etc/someprogram/whatever.conf

Note that you always have to pass the absolute path to the script.

lincon now moves the config file to /home/user/configs/etc/someprogram/whatever.conf and creates a hardlink at /etc/someprogram/whatever.conf.

If you want to deploy a config file from your repo to the system, just call

$ ./lincon deploy /etc/otherprogram/settings.conf

The command will create a hardlink at /etc/otherprogram/settings.conf, which points to the file in your repository (in this case /home/user/configs/etc/otherprogram/settings.conf.

In case there is already a config file with the same name, the file will get backed up to /etc/otherprogram/settings.conf.bak.

Note: Since checking out different git branches deletes and creates physical files in your file system, hardlinks might break. This means that you might have to re-deploy your config files after doing navigating your git history and switching branches.