From 25c42076611216f1e7c8af8a6077d1557b0742f3 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 27 Mar 2017 17:13:07 +0200 Subject: [PATCH] Add a scripts for running current dev version on GNS3 VM --- scripts/run_on_gns3vm.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/run_on_gns3vm.sh diff --git a/scripts/run_on_gns3vm.sh b/scripts/run_on_gns3vm.sh new file mode 100755 index 00000000..c0d451ab --- /dev/null +++ b/scripts/run_on_gns3vm.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This script will push current dev to a GNS3 VM and +# will also start the server in console + +SERVER_ADDRESS=$1 + +if [ "$SERVER_ADDRESS" == "" ] +then + echo "usage: run_on_gns3vm.sh VM_IP" + exit 1 +fi + +ssh gns3@$SERVER_ADDRESS "sudo service gns3 stop" +rsync -avz --exclude==".git/*" --exclude=='docs/*' --exclude=='tests/*' . "gns3@$SERVER_ADDRESS:gns3server" + +ssh gns3@$SERVER_ADDRESS "cd gns3server;python3 -m gns3server"