lnd-channel-s3-backup/files/lnd-channel-s3-backup.sh
changeset 19 5c8335b57353
equal deleted inserted replaced
18:12e90527dfdc 19:5c8335b57353
       
     1 #!/bin/bash
       
     2 
       
     3 BUCKET=$1
       
     4 CHAN_BACKUP=$2
       
     5 
       
     6 aws s3 mb "s3://$BUCKET/"
       
     7 aws s3api put-bucket-versioning --bucket "$BUCKET" --versioning-configuration Status=Enabled
       
     8 
       
     9 while true; do
       
    10     inotifywait $CHAN_BACKUP
       
    11     aws s3 cp $CHAN_BACKUP "s3://$BUCKET/"
       
    12 done