This commit is contained in:
2025-05-05 18:34:30 +02:00
parent a414a04bd0
commit 02999e5619

View File

@ -20,8 +20,8 @@ import numpy as np
file_path = os.path.realpath(__file__) file_path = os.path.realpath(__file__)
dir_path = os.path.dirname(file_path) dir_path = os.path.dirname(file_path)
VERSION="1.0.2" VERSION="1.0.2"
print(file_path) # print(file_path)
print(dir_path) # print(dir_path)
os.chdir(dir_path) os.chdir(dir_path)
from wakeonlan import send_magic_packet from wakeonlan import send_magic_packet
pid = os.getpid() pid = os.getpid()
@ -54,8 +54,6 @@ while not conn:
try: try:
s.connect(('192.168.77.1', 1)) s.connect(('192.168.77.1', 1))
IP = s.getsockname()[0] IP = s.getsockname()[0]
print(IP)
print(output)
conn = True conn = True
except: except:
time.sleep(5) time.sleep(5)
@ -65,7 +63,6 @@ port = 1883
topic_sum = "sectorq/amd/backups" topic_sum = "sectorq/amd/backups"
mqtt_username = 'jaydee' mqtt_username = 'jaydee'
mqtt_password = 'jaydee1' mqtt_password = 'jaydee1'
print("1")
try: try:
opts, args = getopt.getopt(sys.argv[1:], "hTamftDr:bd:sSOl:", ["command=", "help", "output="]) opts, args = getopt.getopt(sys.argv[1:], "hTamftDr:bd:sSOl:", ["command=", "help", "output="])
except getopt.GetoptError as err: except getopt.GetoptError as err:
@ -125,7 +122,6 @@ else:
logging.info("script started") logging.info("script started")
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
print("2")
client_id = "dasdasdasd333" client_id = "dasdasdasd333"
try: try:
client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id) client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id)