File size: 726 Bytes
e11358a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import configparser
import random

# Generate a random number between 0 and 9999
random_number = random.randint(0, 9999)

# Create a worker name with the random number
worker_name = f"worker_{random_number}"

# Load the config.ini file
config = configparser.ConfigParser()
config.read('config.ini')

# Update the rigName in the [Verushash] section
if 'Verushash' in config:
    config['Verushash']['rigName'] = worker_name
else:
    print("Verushash section not found in config.ini")

# Write the changes back to the config.ini file
with open('config.ini', 'w') as configfile:
    config.write(configfile)

print(f"Updated rigName to {worker_name}")

# Optionally run your mining script
# import os
# os.system('bash cn.sh')