Switch to systemd service Type=notify for Redis
Enable the systemd supervision support in redis configuration files and update the service type in the systemd service file to enable its use. This resolves RHBZ #1172841.
This commit is contained in:
parent
5085a9081d
commit
dc361d6b75
@ -5,6 +5,7 @@ After=network.target
|
||||
[Service]
|
||||
ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --daemonize no
|
||||
ExecStop=/usr/libexec/redis-shutdown redis-sentinel
|
||||
Type=notify
|
||||
User=redis
|
||||
Group=redis
|
||||
RuntimeDirectory=redis
|
||||
|
@ -5,6 +5,7 @@ After=network.target
|
||||
[Service]
|
||||
ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no
|
||||
ExecStop=/usr/libexec/redis-shutdown
|
||||
Type=notify
|
||||
User=redis
|
||||
Group=redis
|
||||
RuntimeDirectory=redis
|
||||
|
@ -136,6 +136,11 @@ sed -i -e 's|OPTIMIZATION?=-O3|OPTIMIZATION=%{optflags}|g' deps/hiredis/Makefile
|
||||
sed -i -e 's|$(LDFLAGS)|%{?__global_ldflags}|g' deps/hiredis/Makefile
|
||||
sed -i -e 's|$(CFLAGS)|%{optflags}|g' deps/linenoise/Makefile
|
||||
sed -i -e 's|$(LDFLAGS)|%{?__global_ldflags}|g' deps/linenoise/Makefile
|
||||
# Configuration file changes and additions
|
||||
%if 0%{?with_systemd}
|
||||
sed -i -e 's|^supervised .*$|supervised systemd|g' redis.conf
|
||||
sed -i -e '$ asupervised systemd|g' sentinel.conf
|
||||
%endif
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} \
|
||||
|
Loading…
Reference in New Issue
Block a user