Change ssh-tunnel

This commit is contained in:
2023-08-11 12:52:50 +02:00
parent efeb2d9938
commit 036e0bd4a9
8 changed files with 148 additions and 146 deletions
+2
View File
@@ -44,6 +44,7 @@ def get_hdd_info():
def set_system_info(ipadress):
freeze_support()
cpu = ()
cpu = cpuinfo.get_cpu_info()['brand_raw']
query = f"UPDATE `Kunden-Server` SET RAM={get_ram_info()}, Prozessor={get_cpu_sql(cpu)[0]}, CPU='{cpu}' WHERE `IP-Adresse`='{ipadress}'"
mysql_connect.update_cpu(query, "Stines-GmbH")
@@ -131,6 +132,7 @@ list = mysql_connect.get_ip(query)
print(f"{filename}-Atfer Get IP")
if list == []:
freeze_support()
query_insert = f"INSERT INTO `Kunden-Server` (Name,`Server-Name`,`IP-Adresse`,Funktion,CPU,RAM,Speicher) VALUES ('unkown','{socket.gethostname()}','{get_local_ip()}','-','','{get_ram_info()}','{get_hdd_info()}')"
print(f"{filename}-List is Empty")
mysql_connect.add_user(query_insert,"Stines-GmbH","")