From 300ccc094a9c5261a42479ce4f241655dbd190e1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 8 Jul 2021 15:16:18 -0400 Subject: ignore balance watcher script --- .gitignore | 1 + watcher.sh | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100755 watcher.sh diff --git a/.gitignore b/.gitignore index b3bbeb6d..131e61c6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ lnurl-server.sqlite3 watcher.log build.json build.sh +watcher.sh diff --git a/watcher.sh b/watcher.sh deleted file mode 100755 index 3fb60993..00000000 --- a/watcher.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -sats=100000000 -threshold=$1 -while true -do - ln=$(lncli --lnddir=/root/.lnda --network=mainnet --chain=bitcoin --rpcserver=localhost:10001 channelbalance | jr .balance) - bc=$(bitcoin-cli getbalance) - el=$(elements-cli getbalance | jr .bitcoin) - total=$(node -pe "$ln + $bc * $sats + $el * $sats") - low=$(node -pe "$total < $threshold") - echo $(date -Is) ln $ln bc $bc el $el tot $total - if "$low"; then - echo "Threshold hit, setting new threshold" - threshold=$total - # yarn pm2 stop 0 > /dev/null - node /root/mailgun/index.js - fi - sleep 10 -done -- cgit v1.2.3