Software > WeeWX

instalacion utilidad subida datos meteoclimatic y plantilla no encontrada

<< < (6/10) > >>

jantoni:
Ah....el log /var/log/meteoclimatic.log no se genera por las siguientes razones:

- Porque es el lanzado meteoclimatic.sh el que indica si hay log o no hay log
- Porque el usuario php no está habilitado para escribir en /var/log

burgati:
Bueno a ver si he hecho algo bien jeje.....

1)En primer lugar en el crontab ahora he puesto esto:  1-59/5 *   * * *   root    /home/pi/meteoclimatic.sh

2)En meteoclimatic.ini he dejado la ruta /var/www/weewx/meteoclimatic.htm, porque no existe nuinguna carpeta htm en var/www

3) El meteoclimatic.log ubicado en /var /log me sigue poniendo esto:

Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old
Could not open input file: meteoclimatic_http.php.old






jantoni:
Bueno.....tranquilidad.

Por eso, pido que no pongáis fotos con las salidas de consola, porque se trabaja muy mal con ellas.....es preferible siempre un corta y pega tradicional para luego copiar el texto.

La razón de lo que te pasa es la siguiente:

Mira tu meteoclimatic.sh, dice lo siguiente y lo voy a ir explicando paso a paso:


--- Citar ---Le indicamos a nuestro sistema operativo que intérprete de comandos vamos a usar
--- Fin de la cita ---
#!/bin/bash


--- Citar ---Nos vamos al directorio /root/meteoclimatic
--- Fin de la cita ---
cd /root/meteoclimatic


--- Citar ---Ejecutamos el script situado en /root/meteoclimatic
--- Fin de la cita ---
#Si no quieres log
#php meteoclimatic_http.php.old
#Si quieres log
php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log


--- Citar ---Salimos
--- Fin de la cita ---
exit


Y ¿donde está el problema?

Que tu lo tienes en /home/pi/ y no en /root/meteoclimatic.

Por tanto, tu script para lanzar el script final debería ser este:


--- Código: ---#!/bin/bash
cd /home/pi
#Si no quieres log
#php meteoclimatic_http.php.old
#Si quieres log
php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log
exit


--- Fin del código ---

Por eso, os decía que estaba todo liado al ir modificando los directorios.

Prueba esa modificación, porque el meteoclimatic.sh que tienes ahora, nunca va a encontrar el script, porque lo hace en /root/meteoclimatic en lugar de en /home/pi.

Saludos.

burgati:
Vale, muchas gracias por las explicaciones, vienen muy bien  ;)

Bueno pues acabo de hacer lo que me has dicho y parace que en meteoclimatic.log ya hay cambios a mejor, creo:

HTTP/1.1 202 Accepted
Date: Mon, 12 Jun 2017 19:31:01 GMT
Server: Apache/2.4.10 (Debian)
X-Error: 202 Accepted
X-DigestKey:
Content-Length: 69
Content-Type: text/plain;charset=UTF-8

Ver: 3a - ID: ESCYL0900000009001D
Query Length: 145
202: Accepted

burgati:
 plau2

Bueno parece que ya rula esto perfectamente......muchas gracias a los dos por ayudarme ya que sin vuestra ayuda hubiese sido incapaz. Ahora haré una copia de seguridad de la tarjeta de la raspy para por si las moscas

Un cordial saludo

Navegación

[0] Índice de Mensajes

[#] Página Siguiente

[*] Página Anterior

Ir a la versión completa