RE: Probleme de tache CRON
Je viens de tester mais pas mieux :
J'ai dans mon script :
#!/bin/bash
ok=`nmap localhost | grep ldapssl | cut -d ' ' -f5`
echo "ok=$ok"
if (test "$ok" != "ldapssl"); then
#echo "pas OK"
env -n PATH
env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X
11
/etc/init.d/slapd start
exit 0
else
#echo "OK"
exit 0
fi
exit 0
Et le retour de sortie est :
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X
11
PWD=/root
LANG=fr_FR@euro
HOME=/root
SHLVL=2
LANGUAGE=fr_FR:fr:en_GB:en
LOGNAME=root
_=/usr/bin/env
Starting OpenLDAP: slapd - failed:
/etc/init.d/slapd: line 1: start-stop-daemon: command not found
Nico
-----Message d'origine-----
De : rixed@happyleptic.org [mailto:rixed@happyleptic.org]
Envoyé : jeudi 4 mai 2006 17:13
À : debian-user-french@lists.debian.org
Objet : Re: Probleme de tache CRON
-[ Thu, May 04, 2006 at 04:33:19PM +0200, Nicolo ]----
> /etc/init.d/slapd: line 1: start-stop-daemon: command not found
A vu de nez, il manque /sbin dans ton PATH (première ligne de la cron,
ajouter PATH=/usr/bin:/bin:/sbin).
Je suppose que ce n'est pas si simple, mais ...
--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"
To UNSUBSCRIBE, email to debian-user-french-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
Reply to: