Init script (and template) improvements

440 views
Skip to first unread message

Reid Parham

unread,
Jul 22, 2013, 8:49:33 PM7/22/13
to redi...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages