Hi Matemática A3K,

On 2018-01-08 17:58, Matemática A3K wrote:

With this https://stackoverflow.com/questions/89228/calling-an-external-command-in-python you can find out which distribution is using, then for each distribution there's a different command for restarting DHCP (systemctl, upstart, system-v) and with the same execute it with sudo to some user with privileges to just do that. You can call that function ("restart_dhcp()") from any django view.


Thanks a lot for your answer.

I would rather avoid using any kind of init system for managing dhcpd, since I would like to run the Django app in a docker container (running systemd inside docker is not a good idea) and the options given for eg. logging and configuration would be quite different from the standard installation of dhcpd on any distro.

So my question is more related to any kind of process that should be managed from a Django app.

But thanks a lot for your input.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8325b598-5db5-2a34-8fc5-aa4c1daf0ad5%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to