modify service

This commit is contained in:
compile_success 2020-01-15 15:57:46 +08:00
parent e62172e314
commit c2cfed6d02
3 changed files with 20 additions and 3 deletions

View File

@ -4,7 +4,6 @@ After=network.target
[Service]
ExecStart=/usr/bin/redis-sentinel /etc/redis-sentinel.conf --supervised systemd
ExecStop=/usr/libexec/redis-shutdown redis-sentinel
Type=notify
User=redis
Group=redis

View File

@ -4,7 +4,6 @@ After=network.target
[Service]
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd
ExecStop=/usr/libexec/redis-shutdown
Type=notify
User=redis
Group=redis

View File

@ -1,6 +1,6 @@
Name: redis
Version: 4.0.11
Release: 2
Release: 3
Summary: A persistent key-value database
License: BSD and MIT
URL: https://redis.io
@ -15,6 +15,9 @@ Redis is an advanced key-value store. It is often referred to as a dattructure s
%prep
%autosetup -p1
sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf
sed -i -e '$ alogfile /var/log/redis/sentinel.log' sentinel.conf
sed -i -e 's|^dir .*$|dir /var/lib/redis|g' redis.conf
%build
make
@ -28,6 +31,19 @@ install -pm644 %{SOURCE3} %{buildroot}%{_unitdir}
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
%post
%systemd_post %{name}.service
%systemd_post %{name}-sentinel.service
%preun
%systemd_preun %{name}.service
%systemd_preun %{name}-sentinel.service
%postun
%systemd_postun_with_restart %{name}.service
%systemd_postun_with_restart %{name}-sentinel.service
%files
%license COPYING
%doc BUGS README.md 00-RELEASENOTES MANIFESTO CONTRIBUTING
@ -39,6 +55,9 @@ install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
%{_unitdir}/%{name}-sentinel.service
%changelog
* Wed Jan 15 2020 zhujunhao <zhujunhao5@huawei.com> - 4.0.11-3
- Modify redis service
* Wed Jan 08 2020 lijin Yang <yanglijin@openeuler.org> - 4.0.11-2
- Package init