mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 19:45:24 +00:00
add sh command to kill gui
This commit is contained in:
parent
f45c0ed26c
commit
ceda43658d
2
.gitignore
vendored
2
.gitignore
vendored
@ -64,5 +64,3 @@ venv.bak/
|
||||
# Other
|
||||
Video
|
||||
.idea/
|
||||
# kill_django.sh is a script to kill the Django server only for developement purposes
|
||||
kill_django.sh
|
||||
|
29
kill_gui.sh
Executable file
29
kill_gui.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Trova i processi che utilizzano la porta 8000
|
||||
PROCESSES=$(lsof -i :8000 | awk 'NR!=1 {print $2}')
|
||||
|
||||
# Termina i processi trovati
|
||||
if [ -n "$PROCESSES" ]; then
|
||||
echo "Terminating processes using port 8000:"
|
||||
for PID in $PROCESSES; do
|
||||
echo "Killing process with PID: $PID"
|
||||
kill -9 $PID
|
||||
done
|
||||
else
|
||||
echo "No processes found using port 8000"
|
||||
fi
|
||||
|
||||
# Trova i processi che utilizzano la porta 5173
|
||||
PROCESSES=$(lsof -i :5173 | awk 'NR!=1 {print $2}')
|
||||
|
||||
# Termina i processi trovati
|
||||
if [ -n "$PROCESSES" ]; then
|
||||
echo "Terminating processes using port 8000:"
|
||||
for PID in $PROCESSES; do
|
||||
echo "Killing process with PID: $PID"
|
||||
kill -9 $PID
|
||||
done
|
||||
else
|
||||
echo "No processes found using port 8000"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user