Je ne pense pas, j'ai quelques cron qui fonctionnent uniquement en sudo crontab (crontab de root) et la commande sudo dans un crontab de pi ne marchait pas.Flintstones a écrit :non je n'ai pas utilisé le "sudo crontab -e" simplement le crontab -e mais avec un sudo devant le script :
*/10 * * * * sudo /home/pi/freebox/freebox_infos.sh > /dev/null
normalement cela revient au même ?
Je n'ai pas le set cookie non plus et pourtant, ça fonctionne. Le problème vient du crontab, vu que ton script en manuel s’exécute correctement.Flintstones a écrit : Par acquit de conscience, j'ai viré la ligne dans le crontab -e pour mettre celle du tuto dans le "sudo crontab -e"
Idem, j'ai donc regardé peu plus les traces quand j'exécute le script manuellement et j'ai une différence ici
il me manque un ligne par rapport au tuto :
Set-Cookie: SID=c53d94da4b4ce6afa470dda84bd0d1cc.1435857371; path=/; Expires= Thu, 02 Jul 2015 17:16:11 GMT
Code : Tout sélectionner
pi@raspberrypi ~/freebox $ ./freebox_infos.sh Uptime : 0%20jours%2019%20heures%2044%20mn%2041%20secs Max Upload xDSL rate: 1180%20kb/s Max Download xDSL rate: 18465%20kb/s Firmware : 3.1.4 Free space HD : 168161%20MBytes HTTP/1.1 200 OK Content-Length: 53 Content-Type: application/json;charset=UTF-8 Cache-Control: no-cache Pragma: no-cache Access-Control-Allow-Origin: * { "status" : "OK", "title" : "Update Device" } HTTP/1.1 200 OK Content-Length: 53 Content-Type: application/json;charset=UTF-8 Cache-Control: no-cache Pragma: no-cache Access-Control-Allow-Origin: * { "status" : "OK", "title" : "Update Device" } HTTP/1.1 200 OK Content-Length: 53 Content-Type: application/json;charset=UTF-8 Cache-Control: no-cache Pragma: no-cache Access-Control-Allow-Origin: * { "status" : "OK", "title" : "Update Device" } HTTP/1.1 200 OK Content-Length: 53 Content-Type: application/json;charset=UTF-8 Cache-Control: no-cache Pragma: no-cache Access-Control-Allow-Origin: * { "status" : "OK", "title" : "Update Device" } HTTP/1.1 200 OK Content-Length: 53 Content-Type: application/json;charset=UTF-8 Cache-Control: no-cache Pragma: no-cache Access-Control-Allow-Origin: * { "status" : "OK", "title" : "Update Device" } pi@raspberrypi ~/freebox $
Par hasard, le chemin est bon ? Ton dossier c'est bien "freebox" et non "Freebox" ? (D'après ce que je vois dans le code que tu nous as transmis, ton dossier est bien "freebox" et non "Freebox". Le problème ne vient pas de là.)
Le chmod a été fait ? (Fais un ls -l dans le dossier freebox, verifie si tu as les même droit que moi : )
Code : Tout sélectionner
-rwxr--r-- 1 pi pi 3776 Sep 2 21:17 freebox_infos.sh

