when i was using the old rasp with linux whezzy all is good but when i use the script on my new rasp3 with stretch i dont work anymore

meby someone can help me with it
i run in in shell and is says this
Code: Select all
pi@raspberrypi:~/domoticz/scripts $ ./door.sh
{"ok":true,"result":{"message_id":2541,"from":{"id":xxxxxx,"is_bot":true,"first_name":"DomoticzDog","username":"Domoticzdog bot"},"chat":{"id":-xxxxxxxxx,"title":"domoticz thuis","type":"group","all_members_are_administrators":true},"date":xxxxxxxx, "text":"Er is zojuist aangebeld!"}}--2018-04-21 16:03:47-- http://127.0.0.1:8080/camsnapshot.jpg?idx=1
Verbinding maken met 127.0.0.1:8080... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK
Lengte: 0 [image/jpeg]
Wordt opgeslagen als: ‘STDOUT’
- [ <=> ] 0 --.-KB/s in 0s
2018-04-21 16:03:47 (0,00 B/s) - geschreven naar standaarduitvoer [0/0]
{"ok":true,"result":{"message_id":XXXX,"from":{"id":XXXXX,"is_bot":true,"first_name":"DomoticzDog","username":"Domoticzdog bot"},"chat":{"id":-XXXXXX,"title":"domoticz thuis","type":"group","all_members_are_administrators":true},"date":xxxxxxxxx, "text":"Kijk wie er aangebeld heeft:"}}{"ok":false,"error_code":400,"description":"Bad Request: file must be non-empty"}
Code: Select all
#!/bin/sh
#################################################################
IP="192.168.178.13" # IP address Camera
##########################################################
curl "https://api.telegram.org/botXXXXXXXXX:XXXXXXXXX/sendMessage?chat_id=-XXXXXXX&text=Er is zojuist $
if ping -c 1 $IP > /dev/null ; then # if IPCAM is online then:
wget -O - http://127.0.0.1:8080/camsnapshot.jpg?idx=1 > /tmp/snapshot.jpg
curl "https://api.telegram.org/botXXXXX:XXXXX/sendMessage?chat_id=-XXXXXX&text=Kijk wie er aa$
sleep 1
curl -s -X POST "https://api.telegram.org/botXXXXXX:XXXXXXX/sendPhoto" -F chat_id=-XXXXXXX -F pho$
/bin/rm /tmp/snapshot.jpg
else
curl "https://api.telegram.org/botXXXX:XXXXX/sendMessage?chat_id=-XXXXXX&text=IP-cam niet be$
fi