[wxPython] Dumb python question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Dumb python question

Cliff Baeseman
Hi all,

   I built this specialized web server for my wxPython app now I need to turn
this server into a deamon. What is the correct way to do this. Do I have to put
in some sort of entry into inet d or build a startup script??? confused.

Cliff

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Dumb python question

Volker Goebbels
Hi,

>    I built this specialized web server for my wxPython app now I need to
> turn
> this server into a deamon. What is the correct way to do this. Do I have
> to put
> in some sort of entry into inet d or build a startup script??? confused.

if the daemonizing of the code works correctly, the installation as a inet
service is like that:
1. put a line in /etc/services:
   mydaemon          X/tcp
   where "X" is the port, your daemon listens to and "mydaemon" is the
name
   of your daemon.
2. put a line in inetd.conf:
   mydaemon stream tcp nowait mydaemon /full/path/to/mydaemon
3. Give inetd a signal to reread it's config:
   killall -HUP inetd
This should work, if the daemon itself works correctly :*)

Best regards,
Volker Goebbels
---
Dr. rer. nat Volker M. Goebbels         2science Scientific Consulting
http://www.2science.de                          EMail: [hidden email]

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Dumb python question

Jeffrey Kunce
In reply to this post by Cliff Baeseman
>   I built this specialized web server for my wxPython app now I need to turn
>this server into a deamon. What is the correct way to do this. Do I have to put
>in some sort of entry into inet d or build a startup script??? confused.

For some code to turm any python program into a daemon, see:
  daemonize.py
at
  http://starship.python.net/crew/jjkunce/

But even then, you will need to start the daemon with inetd, or
a cron job or something...

  --Jeff



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users