-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
26 lines (19 loc) · 670 Bytes
/
run.sh
File metadata and controls
26 lines (19 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
path="/home/pi/ePaper"
LOCKFILE="$path/run.sh.lock"
subject="http://192.168.178.69:1880/ui/"
api="http://192.168.178.69:3000/api/screenshot?"
url="${api}resX=1200&resY=825&outFormat=png&waitTime=14000&isFullPage=false&dismissModals=true&url=$subject"
kuma="http://192.168.178.69:3001/api/push/1q4lhpcbhN?status=up&msg=OK&ping="
if [ -e "$LOCKFILE" ]; then
exit 1
fi
touch "$LOCKFILE"
curl -o $path/screenshot.png "$url"
#convert $path/screenshot.png -resize 400% $path/screenshot.png
convert $path/screenshot.png $path/pika.bmp
sudo $path/driver/IT8951/IT8951 0 0 $path/pika.bmp
rm $path/screenshot.png
rm $path/pika.bmp
curl $kuma
rm "$LOCKFILE"