Closed dorianim closed 3 years ago
Thats cool! Do you also have something for systemd?
In Ajenti
we are still using subprocess
to manage systemd
: https://github.com/ajenti/ajenti/blob/master/plugins/services/managers/systemd_manager.py
I just found this : https://github.com/systemd/python-systemd, but I didn't try it, maybe it worth having an eye on it.
Yes, I found that two, but it does not seem.to be very well maintained.
I decided not to do this using native python as I couldn't get it to work in a reasonable amount of time.
For apt update and upgrade it is possible to use native python code instead of a system call: https://gist.github.com/yumminhuang/8b1502a49d8b20a6ae70