From: Dobrica Pavlinusic Date: Thu, 12 Aug 2021 09:13:45 +0000 (+0200) Subject: make upgrade - stop systemd, upload, start it again X-Git-Url: http://git.rot13.org/?p=GroveSensor;a=commitdiff_plain;h=HEAD;hp=2ebc9a48319e5235f70886cfde7f86e4fa43a09b make upgrade - stop systemd, upload, start it again --- diff --git a/Makefile b/Makefile index 764582e..7de2e30 100644 --- 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 diff --git a/README.md b/README.md index 40e3da0..529157c 100644 --- 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 + +Make upgrade will stop systemd service, upload new version and +start it again.