Skip to content

Commit

Permalink
Support for AUTO_ARCHIVE on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
guydavis committed Aug 21, 2023
1 parent 8e590e1 commit 79c4b7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 5 additions & 1 deletion scripts/plotman_autoplot.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/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
# Start plotting automatically if requested (not the default)
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

0 comments on commit 79c4b7d

Please sign in to comment.