summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2020-10-30 10:49:55 +0100
committerxengineering <mail2xengineering@protonmail.com>2020-10-30 11:00:01 +0100
commit6829d05453658a9f9672c847299c652b15126db1 (patch)
tree60d0f4ae1ec6950648e954c9a6528ce5a8e628ce /Makefile
parent84b9ddcc2905f5d8667cfef1359b724c23d27365 (diff)
downloadiot-barcode-scanner-6829d05453658a9f9672c847299c652b15126db1.tar
iot-barcode-scanner-6829d05453658a9f9672c847299c652b15126db1.tar.zst
iot-barcode-scanner-6829d05453658a9f9672c847299c652b15126db1.zip
Introduce iot-barcode.target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 895cb38..7c9252f 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ install:
# install executables
mkdir -p $(bindir)
$(INSTALL_PROGRAM) iot_barcode_device_handler $(bindir)/
- $(INSTALL_PROGRAM) iot_barcode_daemon $(bindir)/
+ $(INSTALL_PROGRAM) iot_barcode_transmitter $(bindir)/
# install library / package
mkdir -p $(libdir)/
@@ -35,8 +35,12 @@ install:
$(INSTALL_DATA) config.json $(confdir)/config.json
# install systemd unit files
- $(INSTALL_DATA) iot-barcode.service $(systemddir)/
- $(INSTALL_DATA) iot-barcode-device-handler.service $(systemddir)/
+ $(INSTALL_DATA) systemd/iot-barcode-transmitter.service $(systemddir)/
+ systemctl enable iot-barcode-transmitter.service
+ $(INSTALL_DATA) systemd/iot-barcode-device-handler.service $(systemddir)/
+ systemctl enable iot-barcode-device-handler.service
+ $(INSTALL_DATA) systemd/iot-barcode.target $(systemddir)/
+ systemctl daemon-reload
# install license
mkdir -p $(sharedir)/licenses/
@@ -46,11 +50,15 @@ install:
uninstall:
rm -f $(bindir)/iot_barcode_device_handler
- rm -f $(bindir)/iot_barcode_daemon
+ rm -f $(bindir)/iot_barcode_transmitter
rm -f $(libdir)/__init__.py
rm -f $(libdir)/config.py
rm -f $(libdir)/mqtt.py
rm -f $(libdir)/static.py
- rm -f $(systemddir)/iot-barcode.service
+ systemctl disable iot-barcode-transmitter.service
+ rm -f $(systemddir)/iot-barcode-transmitter.service
+ systemctl disable iot-barcode-device-handler.service
rm -f $(systemddir)/iot-barcode-device-handler.service
+ systemctl disable iot-barcode.target
+ rm -f $(systemddir)/iot-barcode.target
rm -f $(sharedir)/licenses/$(PKGNAME)