Commit 9bde2f75 authored by Markus Frosch's avatar Markus Frosch 📣

Remove sentinel service from packages

parent eea319cf
......@@ -10,7 +10,7 @@ ExecStop=/usr/libexec/icinga-redis-shutdown redis-sentinel
Type=notify
User=icinga-redis
Group=icinga-redis
RuntimeDirectory=redis
RuntimeDirectory=icinga-redis
RuntimeDirectoryMode=0755
[Install]
......
......@@ -153,6 +153,9 @@ make %{?_smp_mflags} %{make_flags} all
%install
make %{make_flags} install
# Remove redis-sentinel from installation
rm -f %{buildroot}%{_bindir}/%{src_name}-sentinel
# Filesystem.
install -d %{buildroot}%{_sharedstatedir}/%{name}
install -d %{buildroot}%{_localstatedir}/log/%{name}
......@@ -165,19 +168,20 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# Install configuration files.
install -pd %{buildroot}%{_sysconfdir}/%{name}
install -pDm640 %{src_name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{src_name}.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/%{src_name}-sentinel.conf
# install -pDm640 sentinel.conf %%{buildroot}%%{_sysconfdir}/%%{name}/%%{src_name}-sentinel.conf
# Install systemd unit files.
mkdir -p %{buildroot}%{_unitdir}
install -pm644 %{S:3} %{buildroot}%{_unitdir}/%{name}.service
install -pm644 %{S:2} %{buildroot}%{_unitdir}/%{name}-sentinel.service
# install -pm644 %%{S:2} %%{buildroot}%%{_unitdir}/%%{name}-sentinel.service
# Install systemd limit files (requires systemd >= 204)
install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
# install -p -D -m 644 %%{S:7} %%{buildroot}%%{_sysconfdir}/systemd/system/%%{name}-sentinel.service.d/limit.conf
# Fix non-standard-executable-perm error.
for bin in $(cd %{buildroot}%{_bindir}; ls redis*); do
# Rename bin file and add prefix if set
[ -z %{?pkg_prefix} ] || mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/%{?pkg_prefix}${bin}
chmod 755 %{buildroot}%{_bindir}/%{?pkg_prefix}${bin}
done
......@@ -195,8 +199,8 @@ for page in man/man?/*; do
file=$(basename $page)
install -Dpm644 $page $man/$dir/%{?pkg_prefix}$file
done
ln -s %{?pkg_prefix}redis-server.1 %{buildroot}%{_mandir}/man1/%{?pkg_prefix}redis-sentinel.1
ln -s %{?pkg_prefix}redis.conf.5 %{buildroot}%{_mandir}/man5/%{?pkg_prefix}redis-sentinel.conf.5
# ln -s %%{?pkg_prefix}redis-server.1 %%{buildroot}%%{_mandir}/man1/%%{?pkg_prefix}redis-sentinel.1
# ln -s %%{?pkg_prefix}redis.conf.5 %%{buildroot}%%{_mandir}/man5/%%{?pkg_prefix}redis-sentinel.conf.5
# Install documentation and html pages
doc=$(echo %{buildroot}/%{_docdir}/%{name})
......@@ -233,22 +237,22 @@ exit 0
%post
%systemd_post %{name}.service
%systemd_post %{name}-sentinel.service
# %%systemd_post %%{name}-sentinel.service
%preun
%systemd_preun %{name}.service
%systemd_preun %{name}-sentinel.service
# %%systemd_preun %%{name}-sentinel.service
%postun
%systemd_postun_with_restart %{name}.service
%systemd_postun_with_restart %{name}-sentinel.service
# %%systemd_postun_with_restart %%{name}-sentinel.service
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{src_name}.conf
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}/%{src_name}-sentinel.conf
# %%attr(0640, redis, root) %%config(noreplace) %%{_sysconfdir}/%%{name}/%%{src_name}-sentinel.conf
%dir %attr(0750, redis, redis) %{_libdir}/%{name}
%dir %attr(0750, redis, redis) %{redis_modules_dir}
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
......@@ -262,11 +266,11 @@ exit 0
%{_mandir}/man1/%{name}*
%{_mandir}/man5/%{name}*
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sentinel.service
# %%{_unitdir}/%%{name}-sentinel.service
%dir %{_sysconfdir}/systemd/system/%{name}.service.d
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
%dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
# %dir %%{_sysconfdir}/systemd/system/%%{name}-sentinel.service.d
# %%config(noreplace) %%{_sysconfdir}/systemd/system/%%{name}-sentinel.service.d/limit.conf
%dir %attr(0755, redis, redis) %ghost %{_localstatedir}/run/%{name}
# %%files devel
......
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