diff options
| author | Adam Soltys <[email protected]> | 2021-08-03 01:52:33 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-03 01:52:33 -0700 |
| commit | e5e2bcf015b128c71cacf125d6aea4a0dddd30c3 (patch) | |
| tree | 09af4085f72fa2466cb0f66768be6e882be30f81 /watcher.sh | |
| parent | 2f52a91c5babde9e374dd9c532448f565bcbfeee (diff) | |
| parent | 1fbae57bb9540b1c116efc367809ac01ae2e9df2 (diff) | |
| download | coinos-server-e5e2bcf015b128c71cacf125d6aea4a0dddd30c3.tar.gz coinos-server-e5e2bcf015b128c71cacf125d6aea4a0dddd30c3.zip | |
Merge branch 'prod' into dev
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 |
