X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=node_ssh%2FMakefile;h=344ea3c82eee686551910e2c6177f87e83956e0d;hb=HEAD;hp=69c6c13e7c4ec0c823892fe5fc6cc6f2e7baf55a;hpb=61a5da5addae0c896e7a1dcd9bd356d367092c2e;p=tests.git diff --git a/node_ssh/Makefile b/node_ssh/Makefile index 69c6c13..344ea3c 100644 --- a/node_ssh/Makefile +++ b/node_ssh/Makefile @@ -2,6 +2,8 @@ CODE = nst.py CONFIG = nst_config +SSH_CONFIG = ssh_config + CRON = nst.cron CROND = /etc/init.d/crond @@ -9,30 +11,39 @@ CROND = /etc/init.d/crond APPS = nst datadir := /usr/share -appdir := /planetlab/tests/nst +vardir := /var/lib +appdir := /planetlab/tests/node-ssh all: $(APPS) -nst: $(CODE) $(CONFIG) $(CRON) data +nst: $(CODE) config cron data install -D -m 755 nst.py $(datadir)/$(appdir)/$(CODE) - install -D -m 750 nst_config $(datadir)/$(appdir)/$(CONFIG) - install -D -m 644 nst.cron /etc/cron.d/$(CRON) # create symlink to executable ln -s $(datadir)/$(appdir)/$(CODE) /usr/bin/nst - # reload cron +cron: $(CRON) + install -D -m 644 $(CRON) /etc/cron.d/$(CRON) + + # restart cron $(CROND) restart +config: $(CONFIG) + install -D -m 640 $(CONFIG) $(datadir)/$(appdir)/$(CONFIG) + install -D -m 644 $(SSH_CONFIG) /root/.ssh/config data: - install -d -m 755 $(datadir)/$(appdir)/plots/ - install -d -m 755 $(datadir)/$(appdir)/data/ -clean: + install -d -m 755 $(vardir)/$(appdir)/plots/ + install -d -m 755 $(vardir)/$(appdir)/data/ + +cleandata: + rm -Rf $(vardir)/$(appdir) + +clean: cleandata rm -Rf $(datadir)/$(appdir) - rm -rf /etc/cron.d/$(CRON) rm -rf /usr/bin/nst - + rm -rf /root/.ssh/config + rm -rf /etc/cron.d/$(CRON) $(CROND) restart -.PHONY: clean data +.PHONY: clean data config cron nst