Skip to content

Commit beb1931

Browse files
author
Ryan Colobong
committed
Check and Add sipx user in rpm specs prerequisite
1 parent f87ebe8 commit beb1931

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sipXecs/sipxecs.spec.in

+11-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ Requires: freeswitch-endpoint-rtmp
7777
Requires: freeswitch-endpoint-skinny
7878
Requires: freeswitch-endpoint-skypopen
7979
Requires: freeswitch-event-cdr-sqlite
80-
Requires: freeswitch-event-erlang-event
8180
Requires: freeswitch-event-json-cdr
8281
Requires: freeswitch-event-multicast
8382
Requires: freeswitch-event-rayo
@@ -124,6 +123,17 @@ sipXecs is an IP PBX with integrated voice mail, ACD, multiple auto attendents,
124123
# suse and obs build system
125124
mv %{_builddir}/%name-%version/%name-rpmlintrc %{_sourcedir}
126125

126+
%pre
127+
# NOTE: Duplicate copy of user/group add in sipXcommons
128+
if ! /usr/bin/id -g sipx >/dev/null 2>&1; then
129+
/usr/sbin/groupadd -r sipx
130+
fi
131+
132+
if ! /usr/bin/id sipx >/dev/null 2>&1; then
133+
# hack: use "-s /bin/bash", some scripts need to be fixed to not require that
134+
/usr/sbin/useradd -M -r -g sipx -d %{_sysconfdir}/sipxpbx -s /bin/bash -c sipx sipx 2>&1
135+
fi
136+
127137
%build
128138
%configure @SIPX_RPM_CONFIGURE_OPTIONS@
129139
make

0 commit comments

Comments
 (0)