From 00831257a475368a760c85397b108a9bfa5881ce Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 20 Oct 2020 13:07:58 -0700 Subject: [PATCH] Update Makefile --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ebe620b..ce661a2 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,10 @@ download_prebuilt: .PHONY: install install: printer.arm ssh-add - ssh root@$(host) systemctl stop printer 2>&1 >/dev/null + if ssh root@$(host) systemctl is-active --quiet printer; + then + [stop service] + fi scp printer.arm root@$(host): scp printer.service root@$(host):/etc/systemd/system ssh root@$(host) 'systemctl daemon-reload && systemctl enable printer && systemctl restart printer'