Catalyst / admin/Synapse-Cortex 14.8 GB / 57.8 GB 40.0 GB free
Help Sign in

admin / Synapse-Cortex

public

Self Hosted ITSM Tool with RBAC/Tenanting and MFA

Code Issues Pull requests Pipelines Packages Security Insights Wiki Settings
Synapse-Cortex / Synapse-Cortexv2 / playbooks / free-a-port-in-use-linux.json 1570 B · main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
  "name": "Free a Port In Use (Linux)",
  "enabled": true,
  "allowed_target_os": [
    "linux"
  ],
  "required_approval_level": "human_in_the_loop",
  "forbidden_commands": [],
  "graph_json": {
    "nodes": [
      {
        "id": "start",
        "type": "start",
        "data": {},
        "position": {
          "x": 250,
          "y": 0
        }
      },
      {
        "id": "cmd_show",
        "type": "command",
        "data": {
          "label": "Show what's using the port",
          "command": "ss -tulpn | grep :<port>"
        },
        "position": {
          "x": 250,
          "y": 130
        }
      },
      {
        "id": "cmd_kill",
        "type": "command",
        "data": {
          "label": "Kill the process on the port",
          "command": "fuser -k <port>/tcp"
        },
        "position": {
          "x": 250,
          "y": 260
        }
      },
      {
        "id": "cmd_confirm",
        "type": "command",
        "data": {
          "label": "Confirm the port is free",
          "command": "ss -tulpn | grep :<port> || echo \"port <port> is free\""
        },
        "position": {
          "x": 250,
          "y": 390
        }
      }
    ],
    "edges": [
      {
        "id": "e_start_cmd_show",
        "source": "start",
        "target": "cmd_show"
      },
      {
        "id": "e_cmd_show_cmd_kill",
        "source": "cmd_show",
        "target": "cmd_kill"
      },
      {
        "id": "e_cmd_kill_cmd_confirm",
        "source": "cmd_kill",
        "target": "cmd_confirm"
      }
    ]
  }
}