Go to file
2018-09-15 22:15:46 +02:00
LICENSE Initial commit 2018-09-15 20:33:37 +02:00
lincon Initial commit 2018-09-15 20:52:17 +02:00
README.md Add note about breaking hard links 2018-09-15 22:15:46 +02:00

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.

Usage

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.