Attempt to start the socket after installation (#1545027)

This commit is contained in:
Jakub Jelen 2019-04-05 13:02:30 +02:00
parent 5aaa51ec63
commit 05466448c2

View File

@ -108,6 +108,15 @@ rm $RPM_BUILD_ROOT%{_docdir}/pcsc-lite/README.DAEMON
%post
%systemd_post pcscd.socket pcscd.service
# If install, test if pcscd socket is enabled.
# If enabled, then attempt to start it. This will silently fail
# in chroots or other environments where services aren't expected
# to be started.
if [ $1 -eq 1 ] ; then
if systemctl -q is-enabled pcscd.socket > /dev/null 2>&1 ; then
systemctl start pcscd.socket > /dev/null 2>&1 || :
fi
fi
%preun
%systemd_preun pcscd.socket pcscd.service