Hi @stanrate,
I’m guessing this ran on CentOS/RHEL version where systemd is not supported? if so, then I know the cause [which I will explain] if not, please let me know which distro and version this happened on cause on CentOS/RHEL 7 it shouldn’t.
Assuming I’m right, here is what happened.
The %post code for kaltura-monit read:
if [ "$1" -eq 1 ];then
%if %{use_systemd}
#/usr/bin/systemctl preset %{name}.service >/dev/null 2>&1 ||:
/usr/bin/systemctl enable %{name}.service >/dev/null 2>&1 ||:
%else
/sbin/chkconfig --add %{name}
/sbin/chkconfig %{name} on
%endif
else
%if %{use_systemd}
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
%endif
fi
/sbin/service monit restart &>/dev/null || :
%{use_systemd} is defined like so:
%define use_systemd (0%{?fedora} && 0%{?fedora} >= 18) || (0%{?rhel} && 0%{?rhel} >= 7)
And so, on CentOS/RHEL 7 [and onward], the above code would result in:
/usr/bin/systemctl enable kaltura-monit.service >/dev/null 2>&1 ||:
else
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
fi
which is fine, but on CentOS/RHEL 6, it would be:
postinstall scriptlet (using /bin/sh):
if [ "$1" -eq 1 ];then
/sbin/chkconfig --add kaltura-monit
/sbin/chkconfig kaltura-monit on
else
fi
In BASH, an empty else
block is not supported and will trigger:
syntax error near unexpected token fi'
Because /usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
is not really needed during an upgrade on a systemd enabled system at the moment [this is only important if the new version of the package changes /usr/lib/systemd/system/kaltura-monit.service], I simply removed that else completely.
While the warning is not fatal, I still released kaltura-monit-5.21.0-6.x86_64.rpm so it won’t happen to others.
As usual, thanks for reporting!