From 083850431c59f926382894da60eeb188e9a70a35 Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Sun, 1 Jan 2023 11:02:23 -0500 Subject: [PATCH] Added log fetcher --- fetch-logs.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fetch-logs.sh diff --git a/fetch-logs.sh b/fetch-logs.sh new file mode 100644 index 0000000..67ef30c --- /dev/null +++ b/fetch-logs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +LOCATIONS="nova singapore sydney dublin brazil" +SSHKEY="~/.ssh/id-paco-2022" + +for location in ${LOCATIONS} +do + OUTDIR="logs/${location}" + [[ -d ${OUTDIR} ]] || mkdir -p ${OUTDIR} + scp -pr -i ${SSHKEY} "admin@${location}.nickhope.world:/var/log/apache2" ${OUTDIR} +done \ No newline at end of file