From ee6371bb44ddbfcc3b8700721a9835ca9bf2a6fc Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 11 Feb 2020 14:38:16 +0100 Subject: [PATCH 1/3] Add fixed archive --- voicegardens/fixed-archive/.git-dont-delete-me | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 voicegardens/fixed-archive/.git-dont-delete-me diff --git a/voicegardens/fixed-archive/.git-dont-delete-me b/voicegardens/fixed-archive/.git-dont-delete-me new file mode 100644 index 0000000..e69de29 From 860d0be7f06c1c2887339a90c0f320b3182a8625 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 11 Feb 2020 14:42:12 +0100 Subject: [PATCH 2/3] Add fixed archive copying, fix script paths --- bin/clear-archives | 4 ++-- bin/copy-fixed-archive | 10 ++++++++++ cron/voicegardens | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 bin/copy-fixed-archive diff --git a/bin/clear-archives b/bin/clear-archives index 6156e49..1adc490 100755 --- a/bin/clear-archives +++ b/bin/clear-archives @@ -4,7 +4,7 @@ echo "Spitting out todays date and time ..." date echo "Deleting doesitsparkjoy.voicegardens.org archive ..." -rm -rf /var/www/doesitsparkjoy.voicegardens.org/archives/* +rm -rf /var/www/doesitsparkjoy.voicegardens.org/voicegardens/archives/* echo "Deleting voicegardens.org archive ..." -rm -rf /var/www/voicegardens.org/archives/* +rm -rf /var/www/voicegardens.org/voicegardens/archives/* diff --git a/bin/copy-fixed-archive b/bin/copy-fixed-archive new file mode 100755 index 0000000..b2bb0df --- /dev/null +++ b/bin/copy-fixed-archive @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Spitting out todays date and time ..." +date + +echo "Copying over the doesitsparkjoy.voicegardens.org fixed archive ..." +cp /var/www/doesitsparkjoy.voicegardens.org/voicegardens/fixed-archive /var/www/doesitsparkjoy.voicegardens.org/voicegardens/archive + +echo "Copying over the voicegardens.org fixed archive ..." +cp /var/www/voicegardens.org/voicegardens/fixed-archive /var/www/voicegardens.org/voicegardens/archive diff --git a/cron/voicegardens b/cron/voicegardens index 68af78b..dd5f5f7 100644 --- a/cron/voicegardens +++ b/cron/voicegardens @@ -2,3 +2,6 @@ SHELL=/bin/bash # every morning at 09:00, clear the archives 0 9 * * * /var/www/doesitsparkjoy.voicegardens.org/bin/clear-archives | tee -a /var/log/voicegardens.org.log + +# every morning at 09:01, copy over the fixed archive +1 9 * * * /var/www/doesitsparkjoy.voicegardens.org/bin/copy-fixed-archive | tee -a /var/log/voicegardens.org.log From 09c68438463a406c2c75eb9063941e89167dead8 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 11 Feb 2020 15:03:44 +0100 Subject: [PATCH 3/3] Fix paths --- bin/copy-fixed-archive | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/copy-fixed-archive b/bin/copy-fixed-archive index b2bb0df..644f9c1 100755 --- a/bin/copy-fixed-archive +++ b/bin/copy-fixed-archive @@ -4,7 +4,7 @@ echo "Spitting out todays date and time ..." date echo "Copying over the doesitsparkjoy.voicegardens.org fixed archive ..." -cp /var/www/doesitsparkjoy.voicegardens.org/voicegardens/fixed-archive /var/www/doesitsparkjoy.voicegardens.org/voicegardens/archive +cp /var/www/doesitsparkjoy.voicegardens.org/voicegardens/fixed-archive/* /var/www/doesitsparkjoy.voicegardens.org/voicegardens/archive echo "Copying over the voicegardens.org fixed archive ..." -cp /var/www/voicegardens.org/voicegardens/fixed-archive /var/www/voicegardens.org/voicegardens/archive +cp /var/www/voicegardens.org/voicegardens/fixed-archive/* /var/www/voicegardens.org/voicegardens/archive