Older Newer
Sun, 28 May 2006 21:31:36 . . . . i5387C381.versanet.de [First revision...]

Changes by last author:

= Config Converters =

Once again someone whined about the new configuration style consisting of a fantastizillion of files containing only a single value. And once again Bertl wondered why noone came up with a tool to convert back and forth between a configuration directory and a flat file... Being sick of hearing this over and over again, I hacked together two small scripts which do exactly that. [fromDir.sh] creates a .conf file for each vserver configuration directory, [toDir.sh] creates a directory for the given flat .conf file....

= Usage =

Adjust the path in each file to point to your configuration directory, eg. /etc/vservers

Calling fromDir.sh will then create a <vservername>.conf file for each configuration directory, the files will be in your configuration directory.

toDir.sh needs to get the flat .conf file through stdin, ie. call it like this:

toDir.sh < /path/to/vservername.conf


You have been yelled at^W^Wwarned!

= Notes =

The scripts only care about regular files, they will not delete files in your configuration directory, only create new ones or modify existing ones.

= Bugs, Complaints, etc. =

I might enhance the scripts a bit in the future, but I'd actually prefer to see some of those who complained about the directory-based config step forward and enhance or even rewrite them (I suck at bash scripting).