On 2024-02-06, Mark <markbsdmail2...@gmail.com> wrote:
> Hi.
>
> I've redis-6.2.13 installed and running.
>
> I need to run a second Redis instance with a different .conf file.
>
> For instance, under FreeBSD, this is as easy as adding in rc.conf file;
>
> redis_profiles="foo bar"
>
> Giving opportunity to use /usr/local/etc/redis-FOO.conf
> /usr/local/etc/redis-BAR.conf respectively, as separate instances.
>
> How can I do the same under OpenBSD 7.4?
>
> Any help, ideas, tips & tricks would be appreciated,
> Kindest regards.

Unfortunately redis sets the process name in a way that doesn't allow
distinguishing multiple instances by matching the name with the command
line flags, and that's the only way that the rc.d framework allows
matching daemon processes to the script, so running multiple copies via
the rc.d framework won't work in a generic way.

(in the case of many other daemons, one can simply symlink the rc.d
script under a different name, and set flags separately for each name,
but that won't work here)..

You could copy /etc/rc.d/redis under a different name and modify it
so that pexp matches the process title when run with the alternative
config file, or otherwise run it outside of rc.d (e.g. from rc.local).

-- 
Please keep replies on the mailing list.

Reply via email to