#!/bin/sh if [ -f /etc/redis/redis.conf ]; then cp /etc/redis/redis.conf /etc/valkey/valkey.conf mv /etc/redis/redis.conf /etc/redis/redis.conf.rpmsave sed -i 's|^dir\s.*|dir /var/lib/valkey|g' /etc/valkey/valkey.conf echo "/etc/redis/redis.conf has been copied to /etc/valkey/valkey.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey. Manual review of valkey.conf is strongly suggested especially if you had modified redis.conf." fi if [ -f /etc/redis/sentinel.conf ]; then cp /etc/redis/sentinel.conf /etc/valkey/sentinel.conf mv /etc/redis/sentinel.conf /etc/redis/sentinel.conf.rpmsave echo "/etc/redis/sentinel.conf has been copied to /etc/valkey/sentinel.conf. pidfile, logfile, and dir are overridden by the config at /etc/sysconfig/valkey-sentinel. Manual review of sentinel.conf is strongly suggested especially if you had modified sentinel.conf." fi if [ -d /var/lib/redis ]; then cp -r /var/lib/redis/* /var/lib/valkey/ chown -R valkey. /var/lib/valkey mv /var/lib/redis /var/lib/redis.bak echo "On-disk redis dumps copied from /var/lib/redis/ to /var/lib/valkey" fi