make upgrade - stop systemd, upload, start it again
[GroveSensor] / Makefile
index 764582e..7de2e30 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,3 +19,11 @@ upload:
 
 serial:
        microcom -p /dev/ttyUSB0
+
+upgrade: systemctl-stop upload systemctl-start
+
+systemctl-stop:
+       sudo systemctl stop grove-sensor
+
+systemctl-start:
+       sudo systemctl start grove-sensor