-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabfile.py
103 lines (67 loc) · 1.58 KB
/
fabfile.py
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import os
from fabric.api import run, env, task, cd, sudo, execute, hide
from fabric.operations import get, put, reboot
"""
pip install fabric
how to run:
fab show_wallet -H [email protected]
fab minestart -H [email protected]
fab minestop -H [email protected]
fab allow -H [email protected]
fab disallow -H [email protected]
fab restart -H [email protected]
fab update -H [email protected]
fab hostname -H [email protected]
fab pool1pass -H [email protected]
fab show_miner -H [email protected]
fab stats -H [email protected]
fab degflasher -H [email protected]
"""
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
HOME_PATH = '/home/ethos/'
@task
def show_wallet():
run('cat local.conf | grep wallet')
@task
def minestart():
run('minestart')
@task
def minestop():
run('minestop')
@task
def allow():
run('allow')
@task
def disallow():
run('disallow')
@task
def update():
run('update')
@task
def restart():
sudo('hard-reboot')
@task
def pool1pass():
run('cat local.conf | grep poolpass1')
@task
def hostname():
run('hostname')
@task
def show_miner():
run('show miner')
@task
def stats():
run('update | grep hash')
@task
def degflasher():
"""
Information about how to flash your cards in order to improve performance at http://flasher.degconnect.com.
:return:
"""
reboot(wait=45)
run('degflasher')
def main():
print("Please, read head of this file for help.")
print("Information about how to flash your cards in order to improve performance at http://flasher.degconnect.com.")
if __name__ == '__main__':
main()