From 769810056ac23dda767ef4a1bb159a6e05d27e79 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 12 Aug 2021 11:13:45 +0200 Subject: [PATCH] make upgrade - stop systemd, upload, start it again --- Makefile | 8 ++++++++ README.md | 3 +++ 2 files changed, 11 insertions(+) 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. -- 2.20.1