From 79c4b7ddc31358c4120cfa46e1ba667b5e1da59d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 21 Aug 2023 16:23:24 -0600 Subject: [PATCH] Support for AUTO_ARCHIVE on startup. --- docker/dockerfile | 1 + scripts/plotman_autoplot.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/dockerfile b/docker/dockerfile index e605eb03..1f60915b 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -138,6 +138,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV XDG_CONFIG_HOME=/root/.chia ENV AUTO_PLOT=false +ENV AUTO_ARCHIVE=false ENV PLOTMAN_BRANCH=${PLOTMAN_BRANCH} ENV CHIADOG_BRANCH=${CHIADOG_BRANCH} ENV FDCLI_BRANCH=${FDCLI_BRANCH} diff --git a/scripts/plotman_autoplot.sh b/scripts/plotman_autoplot.sh index f1bf85e4..b8a0bafa 100644 --- a/scripts/plotman_autoplot.sh +++ b/scripts/plotman_autoplot.sh @@ -1,6 +1,6 @@ #!/bin/env bash # -# Starts Plotman, when AUTO_PLOT enabled, on a Chia/Chives fullnode or a plotter instance +# Starts Plotman, when AUTO_PLOT/AUTO_ARCHIVE are enabled, on a Chia/Chives/MMX/Gigahorse fullnode or a plotter instance # if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx' || ${blockchains} == 'gigahorse') ]]; then @@ -8,4 +8,8 @@ if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'c if [ ${AUTO_PLOT,,} = "true" ]; then nohup plotman plot >> /root/.chia/plotman/logs/plotman.log 2>&1 & fi + # Start archiving automatically if requested (not the default) + if [ ${AUTO_ARCHIVE,,} = "true" ]; then + nohup plotman archive >> /root/.chia/plotman/logs/archiver.log 2>&1 & + fi fi \ No newline at end of file