forked from gregtinkers/carspeed.py
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
34 lines (25 loc) · 789 Bytes
/
Makefile
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
27
28
29
30
31
32
33
34
TARGET_PATH?=speed-camera
install:
apt-get install python3-picamera python3-docopt python3-opencv python3-scipy python3-numpy imagemagick python3-yaml
pip3 install python-telegram-bot
cp ./speed-camera.service /etc/systemd/system/speed-camera.service
systemctl daemon-reload
systemctl enable speed-camera.service
restart:
systemctl restart speed-camera.service
stop:
systemctl stop speed-camera.service
preview:
python3 speed-camera.py preview --config config.yaml
sync:
rsync --exclude '.*' --exclude 'logs' -azr --progress . ${HOST}:${TARGET_PATH}
sync-logs:
rsync -azr --progress ${HOST}:${TARGET_PATH}/logs/* ./logs/
clean:
rm -rf logs
rm -rf *.jpg
tail:
journalctl -f -u speed-camera.service
connect:
ssh -t ${HOST} "cd ${TARGET_PATH}; bash"