Upstream 3.2.9
Add RuntimeDirectory=redis to systemd unit file (RHBZ #1454700) Mark rundir as %ghost since it may disappear (tmpfs - #1454700) Fix a shutdown failure with Unix domain sockets (RHBZ #1444988) Patch contributed by Nathan Scott
This commit is contained in:
parent
4e3af4a0d8
commit
4f1d5f156d
@ -15,9 +15,10 @@ fi
|
|||||||
CONFIG_FILE="/etc/$SERVICE_NAME.conf"
|
CONFIG_FILE="/etc/$SERVICE_NAME.conf"
|
||||||
|
|
||||||
# Use awk to retrieve host, port from config file
|
# Use awk to retrieve host, port from config file
|
||||||
HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE`
|
HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE`
|
PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE`
|
PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
|
||||||
# Just in case, use default host, port
|
# Just in case, use default host, port
|
||||||
HOST=${HOST:-127.0.0.1}
|
HOST=${HOST:-127.0.0.1}
|
||||||
@ -32,4 +33,8 @@ fi
|
|||||||
[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS"
|
[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS"
|
||||||
|
|
||||||
# shutdown the service properly
|
# shutdown the service properly
|
||||||
$REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown
|
if [ -e "$SOCK" ] ; then
|
||||||
|
$REDIS_CLI -s $SOCK $ADDITIONAL_PARAMS shutdown
|
||||||
|
else
|
||||||
|
$REDIS_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown
|
||||||
|
fi
|
||||||
|
@ -7,6 +7,8 @@ ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no
|
|||||||
ExecStop=/usr/libexec/redis-shutdown
|
ExecStop=/usr/libexec/redis-shutdown
|
||||||
User=redis
|
User=redis
|
||||||
Group=redis
|
Group=redis
|
||||||
|
RuntimeDirectory=redis
|
||||||
|
RuntimeDirectoryMode=0750
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
10
redis.spec
10
redis.spec
@ -11,7 +11,7 @@
|
|||||||
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
|
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
|
||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 3.2.8
|
Version: 3.2.9
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A persistent key-value database
|
Summary: A persistent key-value database
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -235,7 +235,7 @@ fi
|
|||||||
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
|
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
|
||||||
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
|
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
|
||||||
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
|
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
|
||||||
%dir %attr(0750, redis, redis) %{_localstatedir}/run/%{name}
|
%dir %attr(0750, redis, redis) %ghost %{_localstatedir}/run/%{name}
|
||||||
%{_bindir}/%{name}-*
|
%{_bindir}/%{name}-*
|
||||||
%{_libexecdir}/%{name}-*
|
%{_libexecdir}/%{name}-*
|
||||||
%{_mandir}/man1/%{name}*
|
%{_mandir}/man1/%{name}*
|
||||||
@ -256,6 +256,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 29 2017 Nathan Scott <nathans@redhat.com> - 3.2.9-1
|
||||||
|
- Upstream 3.2.9
|
||||||
|
- Add RuntimeDirectory=redis to systemd unit file (RHBZ #1454700)
|
||||||
|
- Mark rundir as %ghost since it may disappear (tmpfs - #1454700)
|
||||||
|
- Fix a shutdown failure with Unix domain sockets (RHBZ #1444988)
|
||||||
|
|
||||||
* Mon Feb 20 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 3.2.8-1
|
* Mon Feb 20 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 3.2.8-1
|
||||||
- Upstream 3.2.8
|
- Upstream 3.2.8
|
||||||
- bugfix for #3796 (MIGRATE could cause server crash after socket error)
|
- bugfix for #3796 (MIGRATE could cause server crash after socket error)
|
||||||
|
Loading…
Reference in New Issue
Block a user