summaryrefslogtreecommitdiff
path: root/gala-anteater.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-09-17 09:25:49 +0000
committerCoprDistGit <infra@openeuler.org>2025-09-17 09:25:49 +0000
commitd94412e160f3bcdab20ed972fb3ddbd0edae0a24 (patch)
treefad0e69e7a01d91dd4945dd1b7aa21683ca53fd6 /gala-anteater.spec
parent28ede685f89e826635810be2b0ef872b4c1d4b2b (diff)
automatic import of gala-anteateropeneuler24.03_LTS_SP1
Diffstat (limited to 'gala-anteater.spec')
-rw-r--r--gala-anteater.spec20
1 files 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