Commit 8d28a9d0 authored by Henrik Triem's avatar Henrik Triem
Browse files

Fix list of services provided

parent 4eef25f8
[Unit]
Description=Redis for Icinga
After=network.target
PartOf=icinga-redis.target
[Service]
Type=notify
User=icinga-redis
Group=icinga-redis
PrivateTmp=true
PIDFile=/var/run/icinga-redis/%i.pid
ExecStart=/usr/sbin/icinga-redis-server /etc/icinga-redis/%i.conf
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 icinga-redis.target
WantedBy=multi-user.target
......@@ -32,13 +32,13 @@ 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
#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
#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
......@@ -46,6 +46,7 @@ Patch1: %{src_name}-conf.patch
Patch2: %{src_name}-enable-bactrace-on-x86-ia64-and_arm32_only.patch
Patch3: %{src_name}-disable_integration_logging.patch
Patch4: reproducible.patch
Patch5: icinga-server-port.patch
BuildRequires: pkgconfig
BuildRequires: procps
BuildRequires: tcl
......@@ -72,6 +73,7 @@ different kind of sorting abilities.
%patch3
%endif
%patch4 -p1
%patch5 -p1
%build
export HOST=OBS # for reproducible builds
......@@ -99,14 +101,14 @@ ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-che
ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-sentinel
perl -p -i -e 's|daemonize yes|daemonize no|g' %{name}.conf
install -Dm 0640 redis.conf %{buildroot}%{_conf_dir}/default.conf.example
#install -Dm 0660 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf.example
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 %{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
......@@ -130,18 +132,18 @@ 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}.target redis@.service redis-sentinel.target redis-sentinel@.service
%service_add_pre %{name}.service
%post
systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/%{name}.conf || true
%service_add_post %{name}.target redis@.service redis-sentinel.target redis-sentinel@.service
%service_add_post %{name}.service
echo "See %{_docdir}/%{name}/README.SUSE to continue"
%preun
%service_del_preun icinga-redis.target icinga-redis@.service icinga-redis-sentinel.target icinga-redis-sentinel@.service
%service_del_preun %{name}.service
%postun
%service_del_postun icinga-redis.target icinga-redis@.service icinga-redis-sentinel.target icigna-redis-sentinel@.service
%service_del_postun %{name}.service
%files
%license COPYING
......@@ -152,8 +154,8 @@ echo "See %{_docdir}/%{name}/README.SUSE to continue"
%{_sbindir}/%{name}-*
%{_sbindir}/rc%{name}
%{_libexecdir}/tmpfiles.d/%{name}.conf
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}.target
%{_unitdir}/%{name}.service
#%%{_unitdir}/%%{name}.target
#%%{_unitdir}/%%{name}-sentinel@.service
#%%{_unitdir}/%%{name}-sentinel.target
%doc README.SUSE
......
Supports Markdown
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