dist/redhat: stop using systemd macros, call systemctl directly

Fedora version of systemd macros does not work correctly on CentOS7,
since CentOS7 does not support "file trigger" feature.
Even after 05d4378, scriptlets on old scylla .rpm and new scylla .rpm is
not completely same.

To fix the issue we need to stop using systemd macros, call systemctl
directly.

Fixes #94
This commit is contained in:
Takuya ASADA 2021-02-02 02:53:35 +09:00 committed by Avi Kivity
parent 611d586981
commit 949cefc251

View File

@ -38,14 +38,20 @@ echo
fi fi
%post %post
%systemd_post scylla-jmx.service if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset scylla-jmx.service ||:
fi
/usr/bin/systemctl daemon-reload ||: /usr/bin/systemctl daemon-reload ||:
%preun %preun
%systemd_preun scylla-jmx.service if [ $1 -eq 0 ] ; then
/usr/bin/systemctl --no-reload disable scylla-jmx.service ||:
/usr/bin/systemctl stop scylla-jmx.service ||:
fi
%postun %postun
%systemd_postun scylla-jmx.service /usr/bin/systemctl daemon-reload ||:
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT