Commit c0fcfc10 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed config: supervised by systemd and PID is stored at /run/redis/redis.pid

parent dfc6911b
......@@ -31,7 +31,8 @@ all: redis-service
mkdir -p /etc/redis
cp redis-6.2.4/redis.conf /etc/redis/redis.conf
cp redis-6.2.4/sentinel.conf /etc/redis/sentinel.conf
sed -i 's/^supervised no/supervised systemd/' /etc/redis/redis.conf
sed -i 's/^# supervised auto/supervised systemd/' /etc/redis/redis.conf
sed -i 's/^pidfile .*/pidfile \/run\/redis\/redis.pid/' /etc/redis/redis.conf
MAX=$$(ulimit -Hn) && let AVAIL=$$MAX-32 && sed -i "s/^# maxclients.*/maxclients $$AVAIL/" /etc/redis/redis.conf
MAXCONN=$$(cat /proc/sys/net/core/somaxconn) && sed -i "s/^tcp-backlog.*/tcp-backlog $$MAXCONN/" /etc/redis/redis.conf
sed -i 's|^dir .*|dir /var/lib/redis|' /etc/redis/redis.conf
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment