diff options
| author | Adam Soltys <[email protected]> | 2021-08-09 20:55:17 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-09 20:55:17 -0700 |
| commit | 56559c7b9749fe62fe2fe0ba90725391d83b8bf7 (patch) | |
| tree | 48d6a0630d05d6787b4410708a5efceff472636b /watcher.sh | |
| parent | 803ecab2b5c3a00d107372ea6757cd6ce0f8224d (diff) | |
| parent | 8d6f65079868ae6134f593752e3380180591623d (diff) | |
| download | coinos-server-56559c7b9749fe62fe2fe0ba90725391d83b8bf7.tar.gz coinos-server-56559c7b9749fe62fe2fe0ba90725391d83b8bf7.zip | |
Merge branch '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 |
