|
|
|
|
Bonjour,
Je souhaiterais lancer fetchmail sous le compte d'un utilisateur normal (nommé fetchmail, dont le répertoire est /var/fetchmail).
J'ai essayé le script :
/etc/init.d/fectchmail suivant:
------------------------------------------------------------------------------------
#!/sbin/runscript
depend() {
need net
use mta
}
checkconfig() {
if [ ! -f /var/fetchmail/.fetchmailrc ]; then
eerror "Configuration file /etc/fetchmailrc not found"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting fetchmail"
start-stop-daemon --start --quiet -c fetchmail --exec /usr/bin/fetchmail \
-- -d ${polling_period} -f /var/fetchmail/.fetchmailrc
eend ${?}
}
stop() {
ebegin "Stopping fetchmail"
start-stop-daemon --stop --quiet --pidfile /var/run/fetchmail.pid
eend ${?}
}
---------------------------------------------------------------------------------------
Apparemment le paramètre -c fetchmail n'est pas le bon, car j'obtiens le message:
fetchmail: lstat: /root/.fetchids: Permission non accordée
quand j'essaie de lancer le service.
Si j'enlève le -c fetchmail , et que je rends root propriétaire du fichier /var/fetchmail/.fetchmailrc, il n'y a plus de problème...
Configuration: GENTOO
Pour lancer un processus sur l'id d'un utilisateur tu peux faire:
|
Salut.
|
Ta solution du crontab est-elle préférable (il y a bien un démon qui gère le cron ?)
|
Répondre à ns50
|