-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdpow
More file actions
executable file
·41 lines (37 loc) · 1.54 KB
/
dpow
File metadata and controls
executable file
·41 lines (37 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# @author webworker01
#
scriptpath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $scriptpath/main
freqfive=('AYA' 'EMC2' 'MIL')
sleeptime=3
if [[ ! -z $1 ]]; then
if [[ ${freqfive[*]} =~ ${1} ]]; then
log "dpow" "Start ${1} Freq 5"
curl --url "http://127.0.0.1:${iguanaport}" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"$1\",\"freq\":5,\"pubkey\":\"${nn_pubkey}\"}"
else
log "dpow" "Start ${1} Freq Default"
curl --url "http://127.0.0.1:${iguanaport}" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"$1\",\"pubkey\":\"${nn_pubkey}\"}"
fi
else
if (( $thirdpartycoins < 1 )); then
dpowlist="coinlist[@]"
else
dpowlist="coinsthird[@]"
fi
for coins in "${!dpowlist}"; do
coin=($coins)
cointostart=${coin[0]}
if [[ ! ${ignoreacs[*]} =~ ${coin[0]} ]] && [[ ! ${skipnotarize[*]} =~ ${coin[0]} ]]; then
if [[ ${freqfive[*]} =~ ${coin[0]} ]]; then
log "dpow" "Start ${coin[0]} Freq 5"
curl --url "http://127.0.0.1:${iguanaport}" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"${cointostart}\",\"freq\":5,\"pubkey\":\"${nn_pubkey}\"}"
else
log "dpow" "Start ${coin[0]} Freq Default"
curl --url "http://127.0.0.1:${iguanaport}" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"${cointostart}\",\"pubkey\":\"${nn_pubkey}\"}"
fi
sleep $sleeptime
fi
done
fi