I am setting up a memcached server in production, and would like the ability to switch between various memory sizes simply by changing out a symlink from one config to another, however I do not want to copy and paste every config into every other config, is it possible to have a master config with multiple child configs?
# master config PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="128" OPTIONS="" # Name: memcached_256 # child config for cache server of 256 # include options from master config CACHESIZE="256" # Name: memcached_512 # child config for cache server of 512 # include options from master config CACHESIZE="512"
Example dir listing:
ls /etc/sysconfig memcached -> /path/to/my/version/controlled/configs/memcached_256
And if I ever need to upgrade, I can simply change the above symlink to:
memcached -> /path/to/my/version/controlled/configs/memcached_512
Then after changing out the symlink, simply restart the service. Or if there is a better way to accomplish this functionality, that would be appreciated as well.