From 09b9cadf0ca1b2b386e1c7af569595c27888e661 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 14 Dec 2014 10:06:02 +0100 Subject: redis: add /etc/security/limits.d/95-redis.conf (for EL <= 6) --- redis-limit | 7 ------- redis-limit-init | 6 ++++++ redis-limit-systemd | 7 +++++++ redis.spec | 6 +++++- 4 files changed, 18 insertions(+), 8 deletions(-) delete mode 100644 redis-limit create mode 100644 redis-limit-init create mode 100644 redis-limit-systemd diff --git a/redis-limit b/redis-limit deleted file mode 100644 index 8003c2f..0000000 --- a/redis-limit +++ /dev/null @@ -1,7 +0,0 @@ -# If you need to change max open file limit -# for example, when you change maxclient in configuration -# you can change the LimitNOFILE value below -# see "man systemd.exec" for information - -[Service] -LimitNOFILE=10240 diff --git a/redis-limit-init b/redis-limit-init new file mode 100644 index 0000000..2986bfd --- /dev/null +++ b/redis-limit-init @@ -0,0 +1,6 @@ +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the value below +# see "man limits.conf" for information +redis soft nofile 10240 +redis hard nofile 10240 diff --git a/redis-limit-systemd b/redis-limit-systemd new file mode 100644 index 0000000..8003c2f --- /dev/null +++ b/redis-limit-systemd @@ -0,0 +1,7 @@ +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the LimitNOFILE value below +# see "man systemd.exec" for information + +[Service] +LimitNOFILE=10240 diff --git a/redis.spec b/redis.spec index d0d962f..dbc4ac5 100644 --- a/redis.spec +++ b/redis.spec @@ -31,7 +31,8 @@ Source4: %{name}.tmpfiles Source5: %{name}-sentinel.init Source6: %{name}-sentinel.service Source7: %{name}-shutdown -Source8: %{name}-limit +Source8: %{name}-limit-systemd +Source9: %{name}-limit-init # Update configuration for Fedora Patch0: 0001-redis-2.8.18-redis-conf.patch @@ -127,6 +128,7 @@ install -p -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/systemd/system/%{name %else install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name} install -p -D -m 755 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-sentinel +install -p -D -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/security/limits.d/95-%{name}.conf %endif # Fix non-standard-executable-perm error @@ -229,6 +231,7 @@ fi %else %{_initrddir}/%{name} %{_initrddir}/%{name}-sentinel +%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf %endif @@ -236,6 +239,7 @@ fi * Sat Dec 13 2014 Remi Collet - 2.8.18-2 - provides /etc/systemd/system/redis.service.d/limit.conf and /etc/systemd/system/redis-sentinel.service.d/limit.conf + or /etc/security/limits.d/95-redis.conf * Thu Dec 4 2014 Remi Collet - 2.8.18-1.1 - EL-5 rebuild with upstream patch -- cgit