diff --git a/Makefile b/Makefile index 6bfe9ee14..09537c61e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ # sure that the variable PREFIX is defined, e.g. make PREFIX=/usr/local # PROGNAME=dump1090 +PREFIX=/usr/local ifdef PREFIX BINDIR=$(PREFIX)/bin @@ -28,3 +29,14 @@ view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o clean: rm -f *.o dump1090 view1090 + +install: + strip -p dump1090 view1090 + ifdef PREFIX + cp -p dump1090 $(BINDIR) + cp -p view1090 $(BINDIR) + mkdir -p $(SHAREDIR) + cp -R public_html/* $(SHAREDIR) + cp -p dump1090.service /lib/systemd/system + systemctl daemon-reload + endif diff --git a/dump1090.service b/dump1090.service new file mode 100644 index 000000000..853c3251b --- /dev/null +++ b/dump1090.service @@ -0,0 +1,11 @@ +[Unit] +Description=dump1090 server +After=network.target sshd.service + +[Service] +EnvironmentFile=-/etc/default/dump1090 +ExecStart=/usr/local/bin/dump1090 $DUMP1090_OPTS +KillMode=process + +[Install] +WantedBy=multi-user.target diff --git a/public_html/gmap.html b/public_html/gmap.html index 9ab2dc28d..d9de28a99 100644 --- a/public_html/gmap.html +++ b/public_html/gmap.html @@ -5,7 +5,7 @@ - + diff --git a/view1090 b/view1090 new file mode 100755 index 000000000..13a88350e Binary files /dev/null and b/view1090 differ