# update.py import sys import subprocess if len(sys.argv) < 3: print("Usage:") print(" python update.py add ") print(" python update.py remove ") sys.exit(1) command = sys.argv[1].lower() if command == "add" and len(sys.argv) == 4: # Run helper.py inside container with add subprocess.run([ "sudo", "docker", "compose", "run", "--rm", "email-proxy", "python", "helper.py", "add", sys.argv[2], sys.argv[3] ]) elif command == "remove" and len(sys.argv) == 3: # Run helper.py inside container with remove subprocess.run([ "sudo", "docker", "compose", "run", "--rm", "email-proxy", "python", "helper.py", "remove", sys.argv[2] ]) else: print("Invalid arguments.") sys.exit(1)