Module: kamailio
Branch: 5.2
Commit: 83523c58e6ee4b82f16a69eacbd961bb119d1fd1
URL:
https://github.com/kamailio/kamailio/commit/83523c58e6ee4b82f16a69eacbd961b…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2018-12-12T19:34:21+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/83523c58e6ee4b82f16a69eacbd961b…
Patch:
https://github.com/kamailio/kamailio/commit/83523c58e6ee4b82f16a69eacbd961b…
---
diff --git a/pkg/kamailio/obs/kamailio.service b/pkg/kamailio/obs/kamailio.service
index 237ad10ef5..c14d6cb2f2 100644
--- a/pkg/kamailio/obs/kamailio.service
+++ b/pkg/kamailio/obs/kamailio.service
@@ -6,7 +6,7 @@ After=network-online.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 01f826cb9b..83877d3fec 100644
--- a/pkg/kamailio/obs/kamailio.spec
+++ b/pkg/kamailio/obs/kamailio.spec
@@ -1184,13 +1184,12 @@ install -m644
pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \
rm -f %{buildroot}%{_libdir}/kamailio/lib*.so
%pre
-%if 0%{?suse_version}
-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 -