lnd-channel-s3-backup/files/lnd-channel-s3-backup.sh
author Luke Hoersten <luke@hoersten.org>
Sun, 08 Jan 2023 12:56:06 -0600
changeset 27 3abee15898bb
parent 19 5c8335b57353
permissions -rw-r--r--
Updated bitcoind and lnd versions and added a lnd hex macaroon script for Zeus.

#!/bin/bash

BUCKET=$1
CHAN_BACKUP=$2

aws s3 mb "s3://$BUCKET/"
aws s3api put-bucket-versioning --bucket "$BUCKET" --versioning-configuration Status=Enabled

while true; do
    inotifywait $CHAN_BACKUP
    aws s3 cp $CHAN_BACKUP "s3://$BUCKET/"
done