From b4eff400f2deef97a104e3f7352ed161bff6f234 Mon Sep 17 00:00:00 2001 From: Mikko Yliniemi Date: Fri, 17 Mar 2017 16:10:06 +0200 Subject: [PATCH 1/3] Added crontab file --- bastion/crontab | 1 + 1 file changed, 1 insertion(+) create mode 100644 bastion/crontab diff --git a/bastion/crontab b/bastion/crontab new file mode 100644 index 0000000..df751a0 --- /dev/null +++ b/bastion/crontab @@ -0,0 +1 @@ +*/15 * * * * cloudfuzzer get-results From a4cd87160f3053ed9d67a89a53d44c83acadce82 Mon Sep 17 00:00:00 2001 From: Mikko Yliniemi Date: Fri, 17 Mar 2017 16:54:05 +0200 Subject: [PATCH 2/3] Added autosync functionality to helpers.sh --- bastion/crontab | 1 - bastion/helpers.sh | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 bastion/crontab diff --git a/bastion/crontab b/bastion/crontab deleted file mode 100644 index df751a0..0000000 --- a/bastion/crontab +++ /dev/null @@ -1 +0,0 @@ -*/15 * * * * cloudfuzzer get-results diff --git a/bastion/helpers.sh b/bastion/helpers.sh index e537684..1e28023 100755 --- a/bastion/helpers.sh +++ b/bastion/helpers.sh @@ -20,6 +20,12 @@ case $1 in "get-stats") "$DIR/get-stats.sh" ;; + "result-autosync-enable") + (crontab -u ubuntu -l ; echo "*/15 * * * * /home/ubuntu/get-results.sh") | crontab -u ubuntu - + ;; + "result-autosync-disable") + crontab -u ubuntu -l | grep -v '/home/ubuntu/get-results.sh' | crontab -u ubuntu - + ;; "ssh-to-master") if [ -z "$PS1" ]; then echo "This command can only be used with interative shell" From 078efc3fd42fb0dc4bacf17e7c3656cc77aab935 Mon Sep 17 00:00:00 2001 From: Mikko Yliniemi Date: Fri, 17 Mar 2017 16:58:52 +0200 Subject: [PATCH 3/3] Added description --- bastion/helpers.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bastion/helpers.sh b/bastion/helpers.sh index 1e28023..36c5c85 100755 --- a/bastion/helpers.sh +++ b/bastion/helpers.sh @@ -63,14 +63,22 @@ case $1 in "get-stats") echo "Get stats from master fuzzvm" ;; + "result-autosync-disable") + echo "Disable autosync of results" + ;; + "result-autosync-enable") + echo "Enable autosync of results" + ;; "ssh-to-master") echo "ssh to fuzzvm swarm master" ;; *) echo "Available commands:" + echo " distribute-docker-image" echo " get-results (fuzzvm1) (fuzzvm2) ..." echo " get-stats" - echo " distribute-docker-image" + echo " result-autosync-disable" + echo " result-autosync-enable" echo " run-containers " echo " setup-swarm ..." if [ ! -z "$PS1" ]; then