add run_shell and run_python tools, deploy-suite target
This commit is contained in:
18
Makefile
18
Makefile
@@ -40,6 +40,24 @@ deploy: test build noc.service
|
||||
systemctl --user enable --now noc
|
||||
systemctl --user restart noc
|
||||
|
||||
SUITE := noc
|
||||
SUITE_DIR := noc
|
||||
GITEA_VERSION := 1.23
|
||||
|
||||
deploy-suite: build
|
||||
ssh $(SUITE) 'mkdir -p ~/bin /data/noc/tools ~/.config/systemd/user && systemctl --user stop noc 2>/dev/null || true'
|
||||
scp target/release/noc $(SUITE):~/bin/
|
||||
scp config.suite.yaml $(SUITE):/data/noc/config.yaml
|
||||
scp noc.service.in $(SUITE):/data/noc/
|
||||
scp -r tools/ $(SUITE):/data/noc/tools/
|
||||
ssh $(SUITE) 'bash -lc "\
|
||||
cd /data/noc \
|
||||
&& sed -e \"s|@REPO@|/data/noc|g\" -e \"s|@PATH@|\$$PATH|g\" noc.service.in > ~/.config/systemd/user/noc.service \
|
||||
&& systemctl --user daemon-reload \
|
||||
&& systemctl --user enable --now noc \
|
||||
&& systemctl --user restart noc \
|
||||
&& systemctl --user status noc"'
|
||||
|
||||
deploy-hera: build
|
||||
ssh $(HERA) 'mkdir -p ~/bin ~/$(HERA_DIR) ~/.config/systemd/user && systemctl --user stop noc 2>/dev/null || true'
|
||||
scp target/release/noc $(HERA):~/bin/
|
||||
|
||||
Reference in New Issue
Block a user