diff options
| author | Adam Soltys <[email protected]> | 2021-08-03 01:52:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-03 01:52:53 -0700 |
| commit | 1344458e0cf3322253599524899b3cce565cf1af (patch) | |
| tree | fd2eb66c71211f25f4e5e2ec209a78747a81e123 /watcher.sh | |
| parent | bca4fe152c83ab6a615a5e1601ca965187ee95e3 (diff) | |
| parent | e5e2bcf015b128c71cacf125d6aea4a0dddd30c3 (diff) | |
| download | coinos-server-1344458e0cf3322253599524899b3cce565cf1af.tar.gz coinos-server-1344458e0cf3322253599524899b3cce565cf1af.zip | |
Merge branch 'dev' into v1.0.0
Diffstat (limited to 'watcher.sh')
| -rwxr-xr-x | watcher.sh | 20 |
1 files changed, 0 insertions, 20 deletions
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 |
