git rid of heredoc, add keys to ssh agent

This commit is contained in:
evan 2020-11-26 22:46:08 -06:00
parent 00831257a4
commit 120a31dbfb

View file

@ -20,14 +20,13 @@ download_prebuilt:
# install to device # install to device
.PHONY: install .PHONY: install
install: printer.arm install: printer.arm
ssh-add eval $(shell ssh-agent -s)
if ssh root@$(host) systemctl is-active --quiet printer; ssh -o AddKeysToAgent=yes root@$(host) systemctl stop printer || true
then
[stop service]
fi
scp printer.arm root@$(host): scp printer.arm root@$(host):
scp printer.service root@$(host):/etc/systemd/system scp printer.service root@$(host):/etc/systemd/system
ssh root@$(host) 'systemctl daemon-reload && systemctl enable printer && systemctl restart printer' ssh root@$(host) systemctl daemon-reload
ssh root@$(host) systemctl enable printer
ssh root@$(host) systemctl restart printer
.PHONY: release .PHONY: release
release: printer.arm printer.x86 release: printer.arm printer.x86