WavJourney / scripts /kill_services.py
zzk1st's picture
Major pull from github
88c0b9b
raw
history blame
272 Bytes
import yaml
import os
# Read the YAML file
with open('config.yaml', 'r') as file:
config = yaml.safe_load(file)
# Extract values for each application
service_port = config['Service-Port']
# Execute the commands
os.system(f'kill $(lsof -t -i :{service_port})')