Samuel Sieb writes:
On 5/9/20 9:45 PM, Sam Varshavchik wrote:There is no issue using "systemctl stop" to stop the entire group of processes, only with using a script that attempts to signal one of process to gracefully shut itself down. Looking for ideas how to get this working. I think I need a way to run %preun scripts as unconfined, but I'm not sure. I haven't had much luck trying to find useful selinux documentation.So why don't you just use "systemctl stop"? That seems to be a lot simpler and more correct.
The main rpm package starts all services. All application services run under the same systemd service, and the startup script takes an inventory of which subpackages are installed, and starts each one's daemon. That seems even more simpler: a single systemd service, instead of half a dozen of them.
Except that if one subpackage gets removed, it needs to stop just its own service. This is easily done, except for selinux.
Now, I could also have subpackage rpms' %preun run systemctl stop, and %postun systemctl start, restarting everything, except for the removed services. But that's terrible.
Attachment:
pgpojtAOprfXv.pgp
Description: PGP signature
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx