/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-09 / Re: run pound as a daemon

[ << ] [ >> ]

[ health check through url test / sipieter nicolas ... ] [ Question about sessions / "Cedric ... ]

Re: run pound as a daemon
sipieter nicolas <niko_2501(at)yahoo.co.jp>
2005-09-28 07:50:19 [ FULL ]
hi there..
i'm searching a way to run pound automaticaly on system
boot. how could i do this?
there's no entry in /etc/init.d/pound
how can i setup pound to get started automaticaly each
time the system reboot?

thanks

[...]

Re: [Pound Mailing List] Re: run pound as a daemon
"Patrice Leonard" <patrice.leonard(at)citobi.be>
2005-09-28 09:44:05 [ FULL ]
Hi,

Here is my /etc/init.d/pound script. Add it in your /etc/init.d directory and
add it to your chkconfig...
I think you'll have to change t to fit your need. For example, I compiled pound
without log to file and I'm using cronolog to catch stdout and stderr and make
a log rotation.

If you have any suggestion to make it better, please, tell me.

Best regards,
Patrice

==========================================================================================================================================

--------------------------------------------------------------------------------

#! /bin/sh

# chkconfig: - 95 95
# description: pound

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

POUND_HOME=/mnt/data/www/pound
NAME=pound
DESC="pound"

#Exit  immediately  if a simple command (see SHELL GRAMMAR above) exits with a
non-zero status.
set -e

#Remove write permission for others
umask 002

case "$1" in
  start)
        echo -n "Starting $DESC: "
        $POUND_HOME/bin/pound -v -f $POUND_HOME/conf/pound.conf -p
$POUND_HOME/pound.pid 2>&1 | /usr/local/sbin/cronolog -S
$POUND_HOME/logs/pound.log "$POUND_HOME/logs/pound.%Y-%m-%d.txt" &
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        kill `cat $POUND_HOME/pound.pid`
        echo "$NAME."
        ;;
  restart)
        echo -n "Restarting $DESC: "
        kill `cat $POUND_HOME/pound.pid`
        sleep 1s
        $POUND_HOME/bin/pound -v -f $POUND_HOME/conf/pound.conf -p
$POUND_HOME/pound.pid 2>&1 | /usr/local/sbin/cronolog -S
$POUND_HOME/logs/pound.log "$POUND_HOME/logs/pound.%Y-%m-%d.txt" &
        echo "$NAME."
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart}" >&2
        exit 1
        ;;
esac

--------------------------------------------------------------------------------

==========================================================================================================================================



----- Original Message ----- 
From: "sipieter nicolas" <niko_2501(at)yahoo.co.jp>
To: <pound(at)apsis.ch>
Sent: Wednesday, September 28, 2005 7:50 AM
Subject: [Pound Mailing List] Re: run pound as a daemon

[...]
Attachments:  
text.html text/html 6169 Bytes

Re: [Pound Mailing List] Re: run pound as a daemon
Sascha Ottolski <sascha.ottolski(at)gallileus.de>
2005-09-28 10:22:54 [ FULL ]
Am Mittwoch, 28. September 2005 07:50 schrieb sipieter nicolas:[...]

as an alternative suggestion, you could give daemontools a try:

http://cr.yp.to/daemontools.html

gives you a very efficient logrotation facility as well, and takes care that 
you pound is restarted automgically, should it ever die (not that I have seen 
it happen :-))


Cheers, 

Sascha
[...]

Re: [Pound Mailing List] Re: run pound as a daemon
sipieter nicolas <niko_2501(at)yahoo.co.jp>
2005-09-28 10:48:06 [ FULL ]
--- Patrice Leonard <patrice.leonard(at)citobi.be> $B$+$i$N%a(B
$B%C%;!<%8!'(B


woah cool, thanks a lot, i already modified it and it's
running just fine thanks !

by any chance, you wouldn't know if it's possible to check
the health of a 3rd party app running on top of my
realserver's HTTP service ?

here are the things i think we can use:
- the application have a dedicated port..
- the application build images on the fly dinamicaly in a
specific directory. alway the same filename..
so, if the image is present (url check?) if the image is
present on my realserver, it mean the 3rd party
application is up and running...

i ask because, sometime that application crash, but the
realserver HTTP service is still up and running.
so pound doesn't see anything and continues to think this
realserver is good while in fact it need to be restarted. 

so, sometime my HTTP servers are ok,
but application on top of it isn't ..
i need to health check that..

any ideas ?
(and thanks again for the init.d/script)








[...]
[...]

MailBoxer