make upgrade - stop systemd, upload, start it again master
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 12 Aug 2021 09:13:45 +0000 (11:13 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 12 Aug 2021 09:13:45 +0000 (11:13 +0200)
Makefile
README.md

index 764582e..7de2e30 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,3 +19,11 @@ upload:
 
 serial:
        microcom -p /dev/ttyUSB0
 
 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
index 40e3da0..529157c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,3 +4,6 @@ Grove Beginner Kit sensors show graphs using InfluxDB and Grafana
 Very simple example how to read sensors and construct serial output
 which can be sent to InfluxDB using simple shell script with just
 stty and curl as dependency
 Very simple example how to read sensors and construct serial output
 which can be sent to InfluxDB using simple shell script with just
 stty and curl as dependency
+
+Make upgrade will stop systemd service, upload new version and
+start it again.