X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa.spec;h=8e31ecc65f49aed08c3c359e17cc7ac8628e0d2d;hb=0ce89bde3d8e9b22f8949c90b6ca37a81acf4b06;hp=d15d78671e0e022f982626aa587c2c4512bd9c18;hpb=1252c666e9ff5b9ed37e22fd3be3c7745836f8d1;p=sfa.git diff --git a/sfa.spec b/sfa.spec index d15d7867..8e31ecc6 100644 --- a/sfa.spec +++ b/sfa.spec @@ -126,7 +126,7 @@ make VERSIONTAG="%{version}-%{taglevel}" SCMURL="%{SCMURL}" install DESTDIR="$RP rm -rf $RPM_BUILD_ROOT %files -/usr/lib/systemd/system/*.service +/lib/systemd/system/*.service %{_bindir}/sfa-start.py* %{_bindir}/sfaadmin.py* %{_bindir}/sfaadmin @@ -191,31 +191,27 @@ rm -rf $RPM_BUILD_ROOT %files tests %{_datadir}/sfa/tests -### sfa installs the 'sfa' service +# arbitrary choice here, subject to manual tweaks if needed +# this is in line with default_config.xml +# no need to enable sfa-db, will be activated as a dependency %post -chkconfig --add sfa +systemctl enable sfa-aggregate +systemctl enable sfa-registry %preun if [ "$1" = 0 ] ; then - /sbin/service sfa stop || : - /sbin/chkconfig --del sfa || : + for service in sfa-aggregate sfa-registry sfa-db; do + systemctl is-enabled $service && systemctl disable $service + systemctl is-active $service && systemctl stop $service + done fi %postun -[ "$1" -ge "1" ] && { service sfa dbdump ; service sfa restart ; } - -#### sfa-cm installs the 'sfa-cm' service -#%post cm -#chkconfig --add sfa-cm -# -#%preun cm -#if [ "$1" = 0 ] ; then -# /sbin/service sfa-cm stop || : -# /sbin/chkconfig --del sfa-cm || : -#fi -# -#%postun cm -#[ "$1" -ge "1" ] && service sfa-cm restart || : +if [ "$1" -ge "1" ] ; then + for service in sfa-db sfa-registry sfa-aggregate; do + systemctl is-active $service && systemctl restart $service + done +fi %changelog * Mon May 28 2018 Thierry - sfa-4.0-0