From 3a5a2c34e36b2341e923dddb30619826c38373bd Mon Sep 17 00:00:00 2001 From: Raynor Date: Wed, 21 Dec 2022 03:36:31 +0000 Subject: [PATCH] Change how archive directory is structured; create folder if needed --- scripts/stream-url.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/stream-url.sh b/scripts/stream-url.sh index a0b6193..9a72801 100644 --- a/scripts/stream-url.sh +++ b/scripts/stream-url.sh @@ -36,6 +36,12 @@ do fi done else + + if [[ ! -d "/data/$today/" ]] + then + mkdir -p "/data/$today/" + fi + curl -X "GET" "$url" --no-progress-meter >> "/data/$today/$today.$host.json" fi @@ -45,4 +51,7 @@ do sleep 5m; fi -done \ No newline at end of file +done + +## Exit 0 by default +exit 0 \ No newline at end of file