Commit 2749a213 authored by Noah Hilverling's avatar Noah Hilverling

Rename from redis to icinga-redis

parent 529418de
Pipeline #7335 failed with stages
in 33 minutes and 12 seconds
# -*- sh -*- # -*- sh -*-
# #
# Bash completion function for the 'redis-cli' command. # Bash completion function for the 'icinga-redis-cli' command.
# #
# Steve # Steve
# -- # --
# http://www.steve.org.uk # http://www.steve.org.uk
# #
_redis-cli() _icinga-redis-cli()
{ {
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
...@@ -27,4 +27,4 @@ _redis-cli() ...@@ -27,4 +27,4 @@ _redis-cli()
fi fi
} }
complete -F _redis-cli redis-cli complete -F _icinga-redis-cli icinga-redis-cli
...@@ -5,10 +5,10 @@ do ...@@ -5,10 +5,10 @@ do
for MODE in default templated for MODE in default templated
do do
case "${BINARY}" in case "${BINARY}" in
redis-server) icinga-redis-server)
NAME="redis" NAME="redis"
;; ;;
redis-sentinel) icinga-redis-sentinel)
NAME="sentinel" NAME="sentinel"
;; ;;
esac esac
......
...@@ -17,11 +17,11 @@ Vcs-Git: https://salsa.debian.org/lamby/pkg-redis.git ...@@ -17,11 +17,11 @@ Vcs-Git: https://salsa.debian.org/lamby/pkg-redis.git
Vcs-Browser: https://salsa.debian.org/lamby/pkg-redis Vcs-Browser: https://salsa.debian.org/lamby/pkg-redis
Rules-Requires-Root: no Rules-Requires-Root: no
Package: redis Package: icinga-redis
Architecture: all Architecture: all
Depends: Depends:
redis-server (<< ${binary:Version}.1~), icinga-redis-server (<< ${binary:Version}.1~),
redis-server (>= ${binary:Version}), icinga-redis-server (>= ${binary:Version}),
${misc:Depends}, ${misc:Depends},
Description: Persistent key-value database with network interface (metapackage) Description: Persistent key-value database with network interface (metapackage)
Redis is a key-value database in a similar vein to memcache but the dataset Redis is a key-value database in a similar vein to memcache but the dataset
...@@ -32,12 +32,12 @@ Description: Persistent key-value database with network interface (metapackage) ...@@ -32,12 +32,12 @@ Description: Persistent key-value database with network interface (metapackage)
. .
This package depends on the redis-server package. This package depends on the redis-server package.
Package: redis-server Package: icinga-redis-server
Architecture: any Architecture: any
Pre-Depends: ${misc:Pre-Depends} Pre-Depends: ${misc:Pre-Depends}
Depends: Depends:
lsb-base (>= 3.2-14), lsb-base (>= 3.2-14),
redis-tools (= ${binary:Version}), icinga-redis-tools (= ${binary:Version}),
${misc:Depends}, ${misc:Depends},
Description: Persistent key-value database with network interface Description: Persistent key-value database with network interface
Redis is a key-value database in a similar vein to memcache but the dataset Redis is a key-value database in a similar vein to memcache but the dataset
...@@ -46,7 +46,7 @@ Description: Persistent key-value database with network interface ...@@ -46,7 +46,7 @@ Description: Persistent key-value database with network interface
. .
The dataset is stored entirely in memory and periodically flushed to disk. The dataset is stored entirely in memory and periodically flushed to disk.
Package: redis-tools Package: icinga-redis-tools
Architecture: any Architecture: any
Depends: Depends:
adduser, adduser,
...@@ -55,9 +55,9 @@ Depends: ...@@ -55,9 +55,9 @@ Depends:
Suggests: Suggests:
ruby-redis, ruby-redis,
Replaces: Replaces:
redis-server (<< 2:2.6.16-1), icinga-redis-server (<< 2:2.6.16-1),
Breaks: Breaks:
redis-server (<< 2:2.6.16-1), icinga-redis-server (<< 2:2.6.16-1),
Description: Persistent key-value database with network interface (client) Description: Persistent key-value database with network interface (client)
Redis is a key-value database in a similar vein to memcache but the dataset Redis is a key-value database in a similar vein to memcache but the dataset
is non-volatile. Redis additionally provides native support for atomically is non-volatile. Redis additionally provides native support for atomically
......
.TH REDIS-BENCHMARK 1 "June 28, 2010" .TH REDIS-BENCHMARK 1 "June 28, 2010"
.SH NAME .SH NAME
redis-benchmark \- Benechmark a Redis instance icinga-redis-benchmark \- Benechmark a icinga-redis instance
.SH SYNOPSIS .SH SYNOPSIS
.B redis-benchmark .B icinga-redis-benchmark
[\-h <host>] [\-p <port>] [\-c <clients>] [\-n <requests]> [\-k <boolean>] [\-h <host>] [\-p <port>] [\-c <clients>] [\-n <requests]> [\-k <boolean>]
.SH DESCRIPTION .SH DESCRIPTION
Redis is a key-value database. It is similar to memcached but the dataset is Redis is a key-value database. It is similar to memcached but the dataset is
...@@ -62,7 +62,7 @@ Idle mode. Just open N idle connections and wait. ...@@ -62,7 +62,7 @@ Idle mode. Just open N idle connections and wait.
\-D \-D
Debug mode. more verbose. Debug mode. more verbose.
.SH AUTHOR .SH AUTHOR
\fBredis-benchmark\fP was written by Salvatore Sanfilippo. \fBicinga-redis-benchmark\fP was written by Salvatore Sanfilippo.
.PP .PP
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
project (but may be used by others). project (but may be used by others).
.TH REDIS-CHECK-AOF 1 "December 13, 2018" .TH REDIS-CHECK-AOF 1 "December 13, 2018"
.SH NAME .SH NAME
redis-check-aof \- Check integrity of a Redis .AOF file icinga-redis-check-aof \- Check integrity of a Redis .AOF file
.SH SYNOPSIS .SH SYNOPSIS
.B redis-check-aof .B icinga-redis-check-aof
filename filename
.SH DESCRIPTION .SH DESCRIPTION
Redis is a key-value database. It is similar to memcached but the dataset is Redis is a key-value database. It is similar to memcached but the dataset is
...@@ -11,7 +11,7 @@ supported. ...@@ -11,7 +11,7 @@ supported.
.PP .PP
This utility checks the integrity of a dumped .AOF file. This utility checks the integrity of a dumped .AOF file.
.SH AUTHOR .SH AUTHOR
\fBredis-check-aof\fP was written by Salvatore Sanfilippo. \fBicinga-redis-check-aof\fP was written by Salvatore Sanfilippo.
.PP .PP
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
project (but may be used by others). project (but may be used by others).
.TH REDIS-CHECK-RDB 1 "December 13, 2018" .TH REDIS-CHECK-RDB 1 "December 13, 2018"
.SH NAME .SH NAME
redis-check-rdb \- Check integrity of Redis dumped database file icinga-redis-check-rdb \- Check integrity of icinga-redis dumped database file
.SH SYNOPSIS .SH SYNOPSIS
.B redis-check-rdb .B icinga-redis-check-rdb
filename filename
.SH DESCRIPTION .SH DESCRIPTION
Redis is a key-value database. It is similar to memcached but the dataset is Redis is a key-value database. It is similar to memcached but the dataset is
...@@ -11,7 +11,7 @@ supported. ...@@ -11,7 +11,7 @@ supported.
.PP .PP
This utility checks the integrity of a dumped database file. This utility checks the integrity of a dumped database file.
.SH AUTHOR .SH AUTHOR
\fBredis-check-rdb\fP was written by Salvatore Sanfilippo. \fBicinga-redis-check-rdb\fP was written by Salvatore Sanfilippo.
.PP .PP
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
project (but may be used by others). project (but may be used by others).
.TH REDIS-CLI 1 "January 13, 2010" .TH REDIS-CLI 1 "January 13, 2010"
.SH NAME .SH NAME
redis-cli \- Command-line client to redis-server icinga-redis-cli \- Command-line client to icinga-redis-server
.SH SYNOPSIS .SH SYNOPSIS
.B redis-cli .B icinga-redis-cli
.RI [options] .RI [options]
.SH DESCRIPTION .SH DESCRIPTION
Redis is a key-value database. It is similar to memcached but the dataset is Redis is a key-value database. It is similar to memcached but the dataset is
not volatile and other datatypes (such as lists and sets) are natively not volatile and other datatypes (such as lists and sets) are natively
supported. supported.
.PP .PP
\fBredis-cli\fP provides a simple command-line interface to a Redis server. \fBicinga-redis-cli\fP provides a simple command-line interface to a icinga-redis server.
.SH OPTIONS .SH OPTIONS
See \fBredis-doc\fP for more information on the commands Redis accepts. See \fBredis-doc\fP for more information on the commands icinga-redis accepts.
.SH AUTHOR .SH AUTHOR
\fBredis-cli\fP was written by Salvatore Sanfilippo. \fBredis-cli\fP was written by Salvatore Sanfilippo.
.PP .PP
......
.TH REDIS-SERVER 1 "March 20, 2009" .TH REDIS-SERVER 1 "March 20, 2009"
.SH NAME .SH NAME
redis-server \- Persistent key-value database icinga-redis-server \- Persistent key-value database
.SH SYNOPSIS .SH SYNOPSIS
.B redis-server .B icinga-redis-server
.RI configfile .RI configfile
.SH DESCRIPTION .SH DESCRIPTION
Redis is a key-value database. It is similar to memcached but the dataset is Redis is a key-value database. It is similar to memcached but the dataset is
...@@ -13,11 +13,11 @@ supported. ...@@ -13,11 +13,11 @@ supported.
.IP "configfile" .IP "configfile"
Read options from specified configuration file. Read options from specified configuration file.
.SH NOTES .SH NOTES
On Debian GNU/Linux systems, \fBredis-server\fP is typically started via the On Debian GNU/Linux systems, \fBicinga-redis-server\fP is typically started via the
\fB/etc/init.d/redis-server\fP initscript, not manually. This defaults to using \fB/etc/init.d/icinga-redis-server\fP initscript, not manually. This defaults to using
\fB/etc/redis/redis.conf\fP as a configuration file. \fB/etc/icinga-redis/redis.conf\fP as a configuration file.
.SH AUTHOR .SH AUTHOR
\fBredis-server\fP was written by Salvatore Sanfilippo. \fBicinga-redis-server\fP was written by Salvatore Sanfilippo.
.PP .PP
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
project (but may be used by others). project (but may be used by others).
# redis-server configure options # icinga-redis-server configure options
# ULIMIT: Call ulimit -n with this argument prior to invoking Redis itself. # ULIMIT: Call ulimit -n with this argument prior to invoking Redis itself.
# This may be required for high-concurrency environments. Redis itself cannot # This may be required for high-concurrency environments. Redis itself cannot
......
#! /bin/sh #! /bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: redis-sentinel # Provides: icinga-redis-server
# Required-Start: $syslog $remote_fs # Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs # Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs # Should-Start: $local_fs
# Should-Stop: $local_fs # Should-Stop: $local_fs
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: redis-sentinel - Persistent key-value db monitor # Short-Description: icinga-redis-server - Persistent key-value db
# Description: redis-sentinel - Persistent key-value db monitor # Description: icinga-redis-server - Persistent key-value db
### END INIT INFO ### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/redis-sentinel DAEMON=/usr/bin/icinga-redis-server
DAEMON_ARGS=/etc/redis/sentinel.conf DAEMON_ARGS=/etc/icinga-redis/redis.conf
NAME=redis-sentinel NAME=icinga-redis-server
DESC=redis-sentinel DESC=icinga-redis-server
RUNDIR=/var/run/sentinel RUNDIR=/var/run/icinga-redis
PIDFILE=$RUNDIR/redis-sentinel.pid PIDFILE=$RUNDIR/icinga-redis-server.pid
test -x $DAEMON || exit 0 test -x $DAEMON || exit 0
...@@ -43,7 +43,7 @@ case "$1" in ...@@ -43,7 +43,7 @@ case "$1" in
echo -n "Starting $DESC: " echo -n "Starting $DESC: "
mkdir -p $RUNDIR mkdir -p $RUNDIR
touch $PIDFILE touch $PIDFILE
chown redis:redis $RUNDIR $PIDFILE chown icinga-redis:icinga-redis $RUNDIR $PIDFILE
chmod 755 $RUNDIR chmod 755 $RUNDIR
if [ -n "$ULIMIT" ] if [ -n "$ULIMIT" ]
...@@ -51,7 +51,7 @@ case "$1" in ...@@ -51,7 +51,7 @@ case "$1" in
ulimit -n $ULIMIT || true ulimit -n $ULIMIT || true
fi fi
if start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS if start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile $PIDFILE --chuid icinga-redis:icinga-redis --exec $DAEMON -- $DAEMON_ARGS
then then
echo "$NAME." echo "$NAME."
else else
......
debian/icinga-redis-server.service /lib/systemd/system
redis.conf /etc/icinga-redis
usr/bin/icinga-redis-check-rdb usr/bin/icinga-redis-server
/var/log/redis/redis-sentinel*.log { /var/log/icinga-redis/icinga-redis-server*.log {
weekly weekly
missingok missingok
rotate 12 rotate 12
......
rm_conffile /etc/icinga-redis/icinga-redis-server.post-down.d/00_example 4:4.0.2-3~
rm_conffile /etc/icinga-redis/icinga-redis-server.post-up.d/00_example 4:4.0.2-3~
rm_conffile /etc/icinga-redis/icinga-redis-server.pre-down.d/00_example 4:4.0.2-3~
rm_conffile /etc/icinga-redis/icinga-redis-server.pre-up.d/00_example 4:4.0.2-3~
debian/icinga-redis-server.1
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
set -eu set -eu
USER="redis" USER="icinga-redis"
GROUP="$USER" GROUP="$USER"
CONFFILE="/etc/redis/sentinel.conf" CONFFILE="/etc/icinga-redis/redis.conf"
if [ "$1" = "configure" ] if [ "$1" = "configure" ]
then then
...@@ -18,7 +18,7 @@ fi ...@@ -18,7 +18,7 @@ fi
if [ "$1" = "configure" ] if [ "$1" = "configure" ]
then then
find /etc/redis -maxdepth 1 -type d -name 'redis-sentinel.*.d' -empty -delete find /etc/icinga-redis -maxdepth 1 -type d -name 'icinga-redis-server.*.d' -empty -delete
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -eu set -eu
CONFFILE="/etc/redis/redis.conf" CONFFILE="/etc/icinga-redis/redis.conf"
if [ "${1}" = "purge" ] if [ "${1}" = "purge" ]
then then
......
src/icinga-redis-trib.rb
utils/lru
debian/bash_completion.d/* /usr/share/bash-completion/completions debian/bash_completion.d/* /usr/share/bash-completion/completions
src/redis-benchmark /usr/bin src/icinga-redis-benchmark /usr/bin
src/redis-check-aof /usr/bin src/icinga-redis-check-aof /usr/bin
src/redis-check-rdb /usr/bin src/icinga-redis-check-rdb /usr/bin
src/redis-cli /usr/bin src/icinga-redis-cli /usr/bin
debian/icinga-redis-benchmark.1
debian/icinga-redis-check-aof.1
debian/icinga-redis-check-rdb.1
debian/icinga-redis-cli.1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -eu set -eu
USER="redis" USER="icinga-redis"
Setup_dir () { Setup_dir () {
DIR="${1}" DIR="${1}"
...@@ -12,7 +12,7 @@ Setup_dir () { ...@@ -12,7 +12,7 @@ Setup_dir () {
mkdir -p ${DIR} mkdir -p ${DIR}
case "${DIR}" in case "${DIR}" in
/var/log/redis) /var/log/icinga-redis)
MODE="02750" MODE="02750"
GROUP="adm" GROUP="adm"
;; ;;
...@@ -33,13 +33,13 @@ if [ "$1" = "configure" ] ...@@ -33,13 +33,13 @@ if [ "$1" = "configure" ]
then then
adduser \ adduser \
--system \ --system \
--home /var/lib/redis \ --home /var/lib/icinga-redis \
--quiet \ --quiet \
--group \ --group \
${USER} || true ${USER} || true
Setup_dir /var/log/redis ${USER}:adm 2750 Setup_dir /var/log/icinga-redis ${USER}:adm 2750
Setup_dir /var/lib/redis ${USER}:${USER} 750 Setup_dir /var/lib/icinga-redis ${USER}:${USER} 750
fi fi
#DEBHELPER# #DEBHELPER#
......
...@@ -4,8 +4,8 @@ set -eu ...@@ -4,8 +4,8 @@ set -eu
if [ "${1}" = "purge" ] if [ "${1}" = "purge" ]
then then
userdel redis || true userdel icinga-redis || true
rm -rf /var/lib/redis /var/log/redis rm -rf /var/lib/icinga-redis /var/log/icinga-redis
fi fi
#DEBHELPER# #DEBHELPER#
......
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
# Description: redis-server - Persistent key-value db
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/redis-server
DAEMON_ARGS=/etc/redis/redis.conf
NAME=redis-server
DESC=redis-server
RUNDIR=/var/run/redis
PIDFILE=$RUNDIR/redis-server.pid
test -x $DAEMON || exit 0
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
. /lib/lsb/init-functions
set -e
if [ "$(id -u)" != "0" ]
then
log_failure_msg "Must be run as root."
exit 1
fi
case "$1" in
start)
echo -n "Starting $DESC: "
mkdir -p $RUNDIR
touch $PIDFILE
chown redis:redis $RUNDIR $PIDFILE
chmod 755 $RUNDIR
if [ -n "$ULIMIT" ]
then
ulimit -n $ULIMIT || true
fi
if start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
then
echo "$NAME."
else
echo "failed"
fi
;;
stop)
echo -n "Stopping $DESC: "
if start-stop-daemon --stop --retry forever/TERM/1 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
then
echo "$NAME."
else
echo "failed"
fi
rm -f $PIDFILE
sleep 1
;;
restart|force-reload)
${0} stop
${0} start
;;
status)
status_of_proc -p ${PIDFILE} ${DAEMON} ${NAME}
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
debian/redis-server.service /lib/systemd/system
redis.conf /etc/redis
usr/bin/redis-check-rdb usr/bin/redis-server
/var/log/redis/redis-server*.log {
weekly
missingok
rotate 12
compress
notifempty
}
rm_conffile /etc/redis/redis-server.post-down.d/00_example 4:4.0.2-3~
rm_conffile /etc/redis/redis-server.post-up.d/00_example 4:4.0.2-3~
rm_conffile /etc/redis/redis-server.pre-down.d/00_example 4:4.0.2-3~
rm_conffile /etc/redis/redis-server.pre-up.d/00_example 4:4.0.2-3~
#!/bin/sh
set -eu
USER="redis"
GROUP="$USER"
CONFFILE="/etc/redis/redis.conf"
if [ "$1" = "configure" ]
then
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
then
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
fi
fi
#DEBHELPER#
if [ "$1" = "configure" ]
then
find /etc/redis -maxdepth 1 -type d -name 'redis-server.*.d' -empty -delete
fi
exit 0