"Jean-Luc Coulon (f5ibh)" <[EMAIL PROTECTED]> writes:
> Le 28.09.2004 20:26:40, Stephane Fombonne a �crit�:
>>Merci pour l'aide ; la technique est �l�gante, car je ne vois pas
>>l'int�r�t
>>d'avoir un fetchmailrc, si on a le ~/.fetchmailrc qui va bien.
>
> Ne pas oublier que fetchmail peut tr�s bien s'occuper de plus d'un
> utilisateur sur un syst�me.
Tout � fait.
Pour une connexion internet de type "dial-up", je conseille la
solution suivante :
On d�sactive le lancement du d�mon � l'init
$ update-rc.d -f fetchmail remove
On cr�e un fichier de conf global par concat�nation des confs de chaque
utilisateur et on lance le d�mon � l'�tablissement de la conexion internet
$ cat /etc/ppp/ip-up.d/fetchmail
#!/bin/sh
#
# Default fetchmail ip-up script (/etc/ppp/ip-up.d/fetchmail)
#
# Change "try-restart" below to "start" if you only want to run fetchmail when
# the PPP link is up.
#
cat /home/*/.fetchmailrc >/etc/fetchmailrc
chmod 700 /etc/fetchmailrc
if [ -x /etc/init.d/fetchmail -a ! -x /sbin/resolvconf ]; then
/etc/init.d/fetchmail start >/dev/null 2>&1
fi
On arr�te le d�mon � la d�connexion
$ cat /etc/ppp/ip-down.d/fetchmail
#!/bin/sh
#
# Default fetchmail ip-down script (/etc/ppp/ip-down.d/fetchmail)
#
# Remove the "exit 0" line if you want only want to run fetchmail when the
# PPP link is up.
#
#exit 0
if [ -x /etc/init.d/fetchmail ]; then
/etc/init.d/fetchmail stop
fi
L�o.