Init script (and template) improvements

Showing 1-1 of 1 messages
Init script (and template) improvements Reid Parham 7/22/13 5:49 PM
I ran into this issue on a production cluster, recently: binding a Redis instance to a non-localhost interface will cause the default init script to fail on the “stop” argument. (https://github.com/copious/redis/blob/unstable/utils/redis_init_script#L30; Ubuntu 12.04 LTS)

The fix I used was defining REDISHOST in /etc/init.d/redis and adjusting line 30 to read as follows:

$CLIEXEC -h $REDISHOST -p $REDISPORT shutdown

While this seems to be an uncommon use case, it is a configuration natively supported by the init script and the template (https://github.com/copious/redis/blob/unstable/utils/redis_init_script.tpl) used by common distributions. Adjusting the init script to add this argument seems like a lightweight solution and I’m not immediately aware of unintended effects.

I propose that at least a comment is needed in the init script to address this. I welcome your feedback.

Reid