stop service ; remove some files ; start service in RPM %postun ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an rpm package where I need to stop the running service, remove
some files and start the service again depending on which package
version was already installed. I assume I need to do this in %postun,
where we normally do condrestart, but I don't know how to check the
version of the previously installed package. Could someone help me
here / does anybody have examples doing something similar ?

For sysv-init i guess it should be trivial to check "service $name
status" to see if it was running, and then stop/start it. But what's
the equivalent for systemd ? Currently I use
%systemd_postun_with_restart, but that needs to be split up so that I
can delete the files while the service is down..


  -jf
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux