From d94412e160f3bcdab20ed972fb3ddbd0edae0a24 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 17 Sep 2025 09:25:49 +0000 Subject: automatic import of gala-anteater --- gala-anteater.spec | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/gala-anteater.spec b/gala-anteater.spec index d8aceaf..89bc162 100644 --- a/gala-anteater.spec +++ b/gala-anteater.spec @@ -33,20 +33,24 @@ Python3 package of gala-anteater %install %py3_install -%pre -if [ -f "%{_unitdir}/gala-anteater.service" ] ; then - systemctl enable gala-anteater.service || : -fi - %post -%systemd_post gala-anteater.service +if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then + # Initial installation + /usr/lib/systemd/systemd-update-helper install-system-units gala-anteater.service || : +fi %preun -%systemd_preun gala-anteater.service +if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then + # Package removal, not upgrade + /usr/lib/systemd/systemd-update-helper remove-system-units gala-anteater.service || : +fi %postun if [ -f "%{_unitdir}/gala-anteater.service" ] ; then - %systemd_postun_with_restart gala-anteater.service + if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then + # Package upgrade, not uninstall + /usr/bin/systemctl try-restart gala-anteater.service || : + fi fi %files -- cgit v1.2.3