File size: 272 Bytes
96ea36d
 
 
 
 
 
 
 
88c0b9b
96ea36d
 
88c0b9b
 
96ea36d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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})')