IPv6 configuration IP should be working now

This commit is contained in:
Donald Cheng Hong Zou
2022-03-29 15:11:50 -04:00
parent 337c9bc01e
commit 5af2fff9ca
3 changed files with 19 additions and 3 deletions

View File

@@ -66,6 +66,9 @@ class addConfiguration:
for i in configs:
if i['port'] == port:
return {"status": False, "reason": f"{port} used by {i['conf']}."}
checkSystem = subprocess.run(f'ss -tulpn | grep :{port} > /dev/null', shell=True)
if checkSystem.returncode != 1:
return {"status": False, "reason": f"Port {port} used by other process in your system."}
return good
def NameCheck(self, data, configs):