added a prune
This commit is contained in:
35
arbitrum-nova-fullnode.prune
Normal file
35
arbitrum-nova-fullnode.prune
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
COMPOSE_NMAME="arbitrum-nova-fullnode"
|
||||
|
||||
BASEPATH="$(dirname "$0")"
|
||||
source $BASEPATH/.env
|
||||
|
||||
echo "running in $BASEPATH"
|
||||
|
||||
#IFS=':' read -ra parts <<< $COMPOSE_FILE
|
||||
|
||||
# Add the --init.prune option to the command list
|
||||
sed -i '/command:/a \ \ - --init.prune=full' "$BASEPATH/$COMPOSE_NAME.yml"
|
||||
|
||||
echo "$(cat $BASEPATH/$COMPOSE_NAME.yml)"
|
||||
|
||||
docker-compose --project-directory "$BASEPATH" up -d
|
||||
|
||||
while true; do
|
||||
# Execute SSH command and extract the answer
|
||||
answer=$($BASEPATH/sync-status.sh $COMPOSE_NAME)
|
||||
|
||||
# Check if answer is "online"
|
||||
if [ "$answer" == "online" ]; then
|
||||
break # Break the loop if answer is "online"
|
||||
else
|
||||
blocknumber=$($BASEPATH/blocknumber.sh $COMPOSE_NAME)
|
||||
echo "$(date) staus is $answer and blocknumber is $blocknumber"
|
||||
fi
|
||||
|
||||
# Wait for 5 minutes before next iteration
|
||||
sleep 5m
|
||||
done
|
||||
|
||||
git -C $BASEPATH checkout $COMPOSE_NAME.yml
|
||||
Reference in New Issue
Block a user