aboutsummaryrefslogtreecommitdiffstats
path: root/watcher.sh
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-07-08 15:16:18 -0400
committerAdam Soltys <[email protected]>2021-07-08 15:16:32 -0400
commit300ccc094a9c5261a42479ce4f241655dbd190e1 (patch)
tree4aa8e7f682f72d997d5bc260275286156b5758ef /watcher.sh
parent556b133ffbd4591b49626c821d7602e09e97a1f2 (diff)
downloadcoinos-server-300ccc094a9c5261a42479ce4f241655dbd190e1.tar.gz
coinos-server-300ccc094a9c5261a42479ce4f241655dbd190e1.zip
ignore balance watcher script
Diffstat (limited to 'watcher.sh')
-rwxr-xr-xwatcher.sh20
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