Re: [Exim] Getting exim to see a pid file

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: dman
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Getting exim to see a pid file
On Sun, Feb 17, 2002 at 05:53:05PM +0000, Sean Rima wrote:
| On Sun, 17 Feb 2002, dman verbalised:
| >| I do something similar when PPP comes up, but sometimes, I can stay
| >| on the net for a few hours and until I reconnect, unless I do a
| >| sendmail - -q, the mail sits in the queue. I may write a small daemon
| >| that would do the job for me.
| >
| > Mmm, if you're still connected, why wouldn't the messages be sent
| > immediately instead of being queued?

|
| Because I tell exim to queue because I am a dialup user so instead of
| bringing PPP up, it queues them.


Oh, you've got a dial-on-demand setup, but you don't want exim to be
demanding a dial. I see now.

| > As for a deamon :
| >
| >     sh -c "while [ 1 ] ; do sleep 10m ; exim -q ; done" &

|
| Umm,

|
| sh -c "while [ -e /var/run/ppp0.pid ] ; do sleep 10m ; exim -q ; done" &


Sure, tailor to suit :-).

| I am hoping this will just stay running until I drop PPPD :)


It will run until that file no longer exists. You'll have to run that
script each time you dial out. Perhaps this is more suitable for
running in an init script :

sh -c "while [ 1 ] ; do while [ -e /var/run/ppp0.pid ] ; do sleep 10m ; exim -q ; done ; sleep 10m ; done" &


The longer the script gets, the better it would be to stick it in its
own file and insert line breaks where appropriate, then run sh on the
file.

-D

--

Pleasant words are a honeycomb,
sweet to the soul and healing to the bones.
        Proverbs 16:24