Module: kamailio
Branch: 5.1
Commit: 6995925d2ddd0618fea1bd75cfee562e008d6075
URL:
https://github.com/kamailio/kamailio/commit/6995925d2ddd0618fea1bd75cfee562…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2018-12-12T19:42:56+03:00
pkg/kamailio/obs: Fixed warning about not existen kamailio group [skip ci]
(cherry picked from commit 5c6e3570c68c6a0eb74a808865f26b0f895c722c)
---
Modified: pkg/kamailio/obs/kamailio.service
Modified: pkg/kamailio/obs/kamailio.spec
Modified: pkg/kamailio/obs/kamailio.tmpfiles
---
Diff:
https://github.com/kamailio/kamailio/commit/6995925d2ddd0618fea1bd75cfee562…
Patch:
https://github.com/kamailio/kamailio/commit/6995925d2ddd0618fea1bd75cfee562…
---
diff --git a/pkg/kamailio/obs/kamailio.service b/pkg/kamailio/obs/kamailio.service
index 0be0dc0e63..ce8e55f95e 100644
--- a/pkg/kamailio/obs/kamailio.service
+++ b/pkg/kamailio/obs/kamailio.service
@@ -5,7 +5,7 @@ After=network.target
[Service]
Type=simple
User=kamailio
-Group=daemon
+Group=kamailio
Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
Environment='SHM_MEMORY=64'
Environment='PKG_MEMORY=4'
diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec
index 57c3122257..9bb825bc20 100644
--- a/pkg/kamailio/obs/kamailio.spec
+++ b/pkg/kamailio/obs/kamailio.spec
@@ -1140,13 +1140,12 @@ install -m644
pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \
rm -f %{buildroot}%{_libdir}/kamailio/lib*.so
%pre
-%if 0%{?suse_version} == 1330
-if ! /usr/bin/getent group daemon &>/dev/null; then
- /usr/sbin/groupadd --gid 2 daemon &> /dev/null
-fi
-%endif
if ! /usr/bin/id kamailio &>/dev/null; then
- /usr/sbin/useradd -r -g daemon -s /bin/false -c "Kamailio daemon" -d
%{_libdir}/kamailio kamailio || \
+ /usr/sbin/useradd --system \
+ --user-group \
+ --shell /bin/false \
+ --comment "Kamailio SIP Server" \
+ --home-dir %{_rundir}/kamailio kamailio || \
%logmsg "Unexpected error adding user \"kamailio\".
Aborting installation."
fi
diff --git a/pkg/kamailio/obs/kamailio.tmpfiles b/pkg/kamailio/obs/kamailio.tmpfiles
index 6c3cc0bc56..dd2c42484c 100644
--- a/pkg/kamailio/obs/kamailio.tmpfiles
+++ b/pkg/kamailio/obs/kamailio.tmpfiles
@@ -1 +1 @@
-D /run/kamailio 0700 kamailio daemon -
+D /run/kamailio 0700 kamailio kamailio -