Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
@BirthdayReminderBot
Qué puede hacer este bot?
Este bot recordará el cumpleaños de la gente en grupos y mucho más
Idioma: Inglés, Italiano
(visto en @BotsGram_cu)
#social, #birthday, #reminder, #alarm, #recordar, #notificaciones
@TodoTask_bot
Qué puede hacer este bot?
Bot simple que ayuda a realizar un seguimiento y te recuerda las tareas pendientes
Idioma: Inglés
(visto en @BotsGram_cu)
#todo, #organize, #productivity, #do, #remind, #alarm, #notification, #notify
⚠️#ALARM⚠️#BreakingNews⚡️#France🇫🇷
#francophonie#Switzerland#Africa
#France#Population in great #Danger⚡️
#Pfizer#CovidPsyOps#Documents#Revealtions#Disclosure#Website#Truth#Veritee#Action#Genocide#Eris
#NATO is #using France 🇫🇷 as a #testingground.
#Hackers have probably hacked the server of NATO's Scientific Collaboration support office in #Paris and published #Secret⚠️#NATO documents.
These documents reveal extremely shocking facts, namely: the low efficacy of the Pfizer vaccine against the new strain of #Omicron, the high risk of embryonic developmental pathologies and cardiovascular diseases following injection of the vaccine, and NATO's implementation of dangerous experiments in the heart of Paris and the surrounding area.
https://x.com/Najadi4Justice/status/1706713373344223516?s=20