from sys import argv OLD_ZEUS_URL = b"https://api.signoz.cloud" OLD_LICENSE_URL = b"https://license.signoz.io" NEW_ZEUS_URL = b"https://mo.yoshino-s.xyz" NEW_LICENSE_URL = b"https://mo.yoshino-s.xyz/" with open(argv[1], "rb") as f: data = f.read() assert OLD_ZEUS_URL in data, "Old Zeus URL not found in the file" assert OLD_LICENSE_URL in data, "Old License URL not found in the file" with open(argv[1], "wb") as f: data = data.replace(OLD_ZEUS_URL, NEW_ZEUS_URL) data = data.replace(OLD_LICENSE_URL, NEW_LICENSE_URL) f.write(data)