forked from dirkhh/adsb-feeder-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (38 loc) · 1.34 KB
/
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
35
36
37
38
39
40
41
42
43
44
ssh-control:
# to avoid having to SSH every time,
# we make a SSH control port to use with rsync.
ssh -M -S /tmp/adsb-pi-setup-ssh-control -fnNT [email protected]
sync-py-control:
# check if the SSH control port is open, if not, open it.
ssh -O check -S /tmp/adsb-pi-setup-ssh-control [email protected] || make ssh-control
rsync -av \
--delete --exclude="*.pyc" --progress \
-e "ssh -S /tmp/adsb-pi-setup-ssh-control" \
src/modules/adsb-pi-setup/filesystem/root/usr/local/share/adsb-pi-setup/ \
[email protected]:/usr/local/share/adsb-pi-setup/
rsync -av \
--exclude="*.pyc" --progress \
-e "ssh -S /tmp/adsb-pi-setup-ssh-control" \
src/modules/adsb-feeder/filesystem/root/opt/adsb/ \
[email protected]:/opt/adsb/
rsync -av \
--exclude="*.pyc" --progress \
-e "ssh -S /tmp/adsb-pi-setup-ssh-control" \
src/modules/adsb-feeder/filesystem/root/usr/bin/ \
[email protected]:/usr/bin/
rsync -av \
--exclude="*.pyc" --progress \
-e "ssh -S /tmp/adsb-pi-setup-ssh-control" \
src/modules/adsb-feeder/filesystem/root/etc/ \
[email protected]:/etc/
# For good measure, copy this Makefile too
rsync -av \
-e "ssh -S /tmp/adsb-pi-setup-ssh-control" \
Makefile \
[email protected]:/usr/local/share/adsb-pi-setup/Makefile
run-loop:
# python3 app.py in a loop
while true; do \
python3 app.py; \
sleep 1; \
done