diff options
author | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2025-08-09 11:02:44 +0200 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2025-08-09 11:09:58 +0200 |
commit | 3e5466ca5f66a2378a88d687d08d372619ae32c9 (patch) | |
tree | 2059bba15f97caed607a20dc88971b76033ff7cb /databases/redis80/files/sentinel.in | |
parent | www/linux-freetube: Update to 0.23.6.b (diff) |
databases/redis80: New port
This is the 8.0.X series of redis
Redis is an open source, advanced key-value store. It is often referred
to as a data structure server since keys can contain strings, hashes,
lists, sets and sorted sets.
You can run atomic operations on these types, like appending to a
string; incrementing the value in a hash; pushing to a list; computing
set intersection, union and difference; or getting the member with
highest ranking in a sorted set.
In order to achieve its outstanding performance, Redis works with an
in-memory dataset. Depending on your use case, you can persist it
either by dumping the dataset to disk every once in a while, or by
appending each command to a log.
Redis also supports trivial-to-setup master-slave replication, with very
fast non-blocking first synchronization, auto-reconnection on net split
and so forth.
WWW: https://redis.io/
Diffstat (limited to 'databases/redis80/files/sentinel.in')
-rw-r--r-- | databases/redis80/files/sentinel.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/databases/redis80/files/sentinel.in b/databases/redis80/files/sentinel.in new file mode 100644 index 000000000000..088f4382fc06 --- /dev/null +++ b/databases/redis80/files/sentinel.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# PROVIDE: sentinel +# REQUIRE: LOGIN +# BEFORE: securelevel +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable `sentinel': +# +#sentinel_enable="YES" +# + +. /etc/rc.subr + +name="sentinel" +rcvar="${name}_enable" + +command="/usr/local/bin/redis-sentinel" +pidfile="/var/run/redis/$name.pid" + +# read configuration and set defaults +load_rc_config "$name" +: ${sentinel_enable="NO"} +: ${sentinel_user="redis"} +: ${sentinel_config="/usr/local/etc/$name.conf"} + +command_args="${sentinel_config} --daemonize yes --pidfile ${pidfile}" +required_files="${sentinel_config}" +start_precmd="${name}_checks" +restart_precmd="${name}_checks" + +sentinel_checks() +{ + if [ x`id -u ${sentinel_user}` != x`stat -f %u ${sentinel_config}` ]; then + err 1 "${sentinel_config} must be owned by user ${sentinel_user}" + fi +} + +run_rc_command "$1" |