!10 Resolve service startup failure whthout no %pre
Merge pull request !10 from panchenbo/openEuler-20.03-LTS
This commit is contained in:
commit
9935d2cbc9
16
redis.spec
16
redis.spec
@ -1,6 +1,6 @@
|
|||||||
Name: redis
|
Name: redis
|
||||||
Version: 4.0.11
|
Version: 4.0.11
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: A persistent key-value database
|
Summary: A persistent key-value database
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
URL: https://redis.io
|
URL: https://redis.io
|
||||||
@ -40,6 +40,14 @@ install -pm644 %{SOURCE3} %{buildroot}%{_unitdir}
|
|||||||
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||||
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
|
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
|
||||||
|
|
||||||
|
%pre
|
||||||
|
getent group %{name} &> /dev/null || \
|
||||||
|
groupadd -r %{name} &> /dev/null
|
||||||
|
getent passwd %{name} &> /dev/null || \
|
||||||
|
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
||||||
|
-c 'Redis Database Server' %{name} &> /dev/null
|
||||||
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post %{name}.service
|
%systemd_post %{name}.service
|
||||||
%systemd_post %{name}-sentinel.service
|
%systemd_post %{name}-sentinel.service
|
||||||
@ -68,6 +76,12 @@ install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
|
|||||||
%{_unitdir}/%{name}-sentinel.service
|
%{_unitdir}/%{name}-sentinel.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 12 2020 panchenbo <panchenbo@uniontech.com> - 4.0.11-7
|
||||||
|
- Type:bugfix
|
||||||
|
- ID: NA
|
||||||
|
- SUG: restart
|
||||||
|
- DESC: Resolve service startup failure whthout no %pre
|
||||||
|
|
||||||
* Mon Jun 01 2020 huanghaitao <huanghaitao8@huawei.com> - 4.0.11-6
|
* Mon Jun 01 2020 huanghaitao <huanghaitao8@huawei.com> - 4.0.11-6
|
||||||
- Resolve service startup failure
|
- Resolve service startup failure
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user