X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=4d125080170567cf5389da04bedf7879c48ff6e7;hb=d910a6190fec258ddbf0e26d01539839ac3fdc76;hp=2fc4409a89ff5818cf3f870fe4dcb71601f59550;hpb=bad15080f628863dd7d37fd98fad688491b6fe66;p=plcapi.git diff --git a/Makefile b/Makefile index 2fc4409..4d12508 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,9 @@ tags: ########## make sync PLCHOST=hostname ifdef PLCHOST -PLCSSH:=root@$(PLCHOST) +ifdef VSERVER +PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER) +endif endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' @@ -92,11 +94,11 @@ RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(PLCSSH)) - echo "sync: You must define target host as PLCHOST on the command line" - echo " e.g. make sync PLCHOST=private.one-lab.org" ; exit 1 + echo "sync: You must define PLCHOST and VSERVER on the command line" + echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1 else - +$(RSYNC) PLC planetlab4.sql migrations $(PLCSSH):/plc/root/usr/share/plc_api/ - ssh $(PLCSSH) chroot /plc/root apachectl graceful + +$(RSYNC) PLC planetlab5.sql migrations $(PLCSSH)/usr/share/plc_api/ + ssh root@$(PLCHOST) vserver $(VSERVER) exec apachectl graceful endif ####################