Commit 6353c672 authored by Noah Hilverling's avatar Noah Hilverling

Merge branch 'structure/remove-service-files' into 'master'

Remove service files

See merge request !3
parents 17a72e66 494d0848
Pipeline #7967 passed with stages
in 5 minutes and 46 seconds
[Unit]
Description=Redis Sentinel target allowing to start/stop all redis-sentinel@.service instances at once
[Unit]
Description=Redis for Icinga
After=network.target
PartOf=icinga-redis-sentinel.target
[Service]
Type=notify
User=icinga-redis
Group=icinga-redis
PrivateTmp=true
PIDFile=/var/run/icinga-redis/sentinel-%i.pid
ExecStart=/usr/sbin/icinga-redis-sentinel /etc/icinga-redis/sentinel-%i.conf
LimitNOFILE=10240
Restart=on-failure
[Install]
WantedBy=multi-user.target icinga-redis.target
[Unit]
Description=Redis for Icinga
After=network.target
[Service]
Type=notify
User=icinga-redis
Group=icinga-redis
PrivateTmp=true
PIDFile=/var/run/icinga-redis/redis.pid
ExecStart=/usr/sbin/icinga-redis-server /etc/icinga-redis/redis.conf
LimitNOFILE=10240
Restart=on-failure
[Install]
WantedBy=multi-user.target
......@@ -25,20 +25,15 @@
Name: %{?pkg_prefix}%{src_name}
Version: 5.0.7
Release: 2
Release: 3
Summary: Persistent key-value database
License: BSD-3-Clause
Group: Productivity/Databases/Servers
URL: https://redis.io
Source0: http://download.redis.io/releases/redis-%{version}.tar.gz
Source1: %{src_name}.logrotate
#Source2: %%{src_name}.target
Source3: %{src_name}.service
Source4: %{src_name}.tmpfiles.d
Source5: README.SUSE
Source6: %{src_name}.sysctl
#Source7: %%{src_name}-sentinel@.service
#Source8: %%{src_name}-sentinel.target
# PATCH-FIX-OPENSUSE -- openSUSE-style init script
Patch0: %{src_name}-initscript.patch
# PATCH-MISSING-TAG -- See https://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
......@@ -50,7 +45,6 @@ Patch5: icinga-server-port.patch
BuildRequires: pkgconfig
BuildRequires: procps
BuildRequires: tcl
BuildRequires: pkgconfig(systemd)
Requires: logrotate
Requires: sudo
Requires(pre): shadow
......@@ -102,18 +96,7 @@ ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-sen
perl -p -i -e 's|daemonize yes|daemonize no|g' %{name}.conf
install -Dm 0640 redis.conf %{buildroot}%{_conf_dir}/redis.conf
#install -Dm 0660 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf
# some sysctl stuff
install -Dm 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysctl.d/00-%{name}.conf
install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
#install -Dm 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.target
install -Dm 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
install -Dm 0644 %{SOURCE4} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
#install -Dm 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}-sentinel@.service
#install -Dm 0644 %{SOURCE8} %{buildroot}%{_unitdir}/%{name}-sentinel.target
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
cp %{SOURCE5} README.SUSE
%check
......@@ -124,7 +107,6 @@ The test suite often fails to start a server, with
'child process exited abnormally' -- sometimes it works.
---------------------------------------------------
EOF
#make %{?_smp_mflags} test || true
%endif
%pre
......@@ -132,38 +114,28 @@ getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name} || :
getent passwd %{name} >/dev/null || \
%{_sbindir}/useradd -g %{name} -s /bin/false -r \
-c "User for %{name} key-value store" -d %{_data_dir} %{name} || :
%service_add_pre %{name}.service
%post
systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/%{name}.conf || true
%service_add_post %{name}.service
echo "See %{_docdir}/%{name}/README.SUSE to continue"
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%license COPYING
%doc 00-RELEASENOTES BUGS CONTRIBUTING README.md
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysctl.d/00-%{name}.conf
%{_bindir}/%{name}-*
%{_sbindir}/%{name}-*
%{_sbindir}/rc%{name}
%{_libexecdir}/tmpfiles.d/%{name}.conf
%{_unitdir}/%{name}.service
#%%{_unitdir}/%%{name}.target
#%%{_unitdir}/%%{name}-sentinel@.service
#%%{_unitdir}/%%{name}-sentinel.target
%doc README.SUSE
%config(noreplace) %attr(-,root,%{name}) %{_conf_dir}/
%dir %attr(0750,%{name},%{name}) %{_data_dir}
%dir %attr(0750,%{name},%{name}) %{_log_dir}
%changelog
* Mon Dec 16 2019 Henrik Triem <henrik.triem@icinga.com> - 5.0.7-3
- Remove systemd related files
* Thu Nov 28 2019 Michael Friedrich <michael.friedrich@icinga.com> - 5.0.7-2
- Fix user
......
### remove redis Warnings about
# WARNING: The TCP backlog setting of 511 cannot be enforced because
# /proc/sys/net/core/somaxconn is set to the lower value of 128.
net.core.somaxconn=512
# WARNING overcommit_memory is set to 0! Background save may fail
# under low memory condition. To fix this issue add
# 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or
# run the command 'sysctl -w vm.overcommit_memory=1' for this to take
# effect.
vm.overcommit_memory=1
[Unit]
Description=Redis target allowing to start/stop all redis@.service instances at once
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