forked from wuzhanfly/filecoin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
auto_pledge_sector.sh
59 lines (47 loc) · 1.18 KB
/
auto_pledge_sector.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#########################################################################
# File Name: auto_pledge_sector.sh
# Author: ml
# mail: ml@ml.com
# Created Time: Wed 25 Mar 2020 06:47:41 PM CST
#########################################################################
#!/bin/bash
lotus_path="/home/cs/filecoin/lotus"
# Colorefull print
function green_print()
{
local text=$@
echo ""
echo -e "\033[1m\033[32m[$text]\033[0m" # 绿色加粗, 并复原
# echo ""
}
function blue_print()
{
local text=$@
# echo ""
echo -e "\033[1m\033[36m[$text]\033[0m" # 蓝色加粗, 并复原
# echo ""
}
function blue_print2()
{
local text=$@
# echo ""
echo -e "\033[36m[$text]\033[0m" # 蓝色, 并复原
# echo ""
}
green_print "Pledge sectors process starting..."
idx=1
tm=15 # 15 min for each round
while ((idx<=2000))
do
t=$(date +%Y_%m_%d_%H_%M)
blue_print "[${t}]:"
blue_print2 "[${idx}] pledge a sector!"
blue_print "${lotus_path}/lotus-storage-miner sectors pledge"
${lotus_path}/lotus-storage-miner sectors pledge
blue_print2 "Waitting ${tm} minutes..."
echo -e ""
let idx++
#sleep 15m
sleep ${tm}m
done
echo -e ""