Иногда бывает ситуация когда 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
Viral Haemorrhagic Fevers #VHFs are a group of illnesses caused by viruses that damage blood vessels and can cause severe bleeding.
Our national guideline on #InfectionPreventionandControl for #VHFs is designed as a major reference for anyone involved in the care and management of #VHFs cases.
🔗Download and read via
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Viral Haemorrhagic Fevers #VHFs are a group of illnesses caused by viruses that damage blood vessels and can cause severe bleeding.
Our national guideline on #InfectionPreventionandControl for #VHFs is designed as a major reference for anyone involved in the care and management of #VHFs cases.
🔗Download and read via
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Viral Haemorrhagic Fevers such as #LassaFever spread mainly from person to person through direct & indirect contact.
When properly done, #HandHygiene is very important to reduce the risk of healthcare workers' infection.
Our #IPC guidelines for #VHFs⬇️
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Viral hemorrhagic fevers #VHFs such as #LassaFever affect multiple organ systems in the body and may be accompanied by bleeding.
Download and share our National Guideline on #IPC for #VHF for measures required in the management of VHFs
🔗
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Viral hemorrhagic fevers #VHFs are a group of infectious diseases that affect multiple organ systems in the body and may be accompanied by bleeding.
What are the #InfectionPreventionandControl practices that need to be in place in the management of VHFs?
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Common Viral Haemorrhagic Fevers #VHFs include #LassaFever, #EbolaVirusDisease, #YellowFever, #DengueFever, #MarburgFever and #CrimeanCongoHaemorrhagicFever.
What are the #InfectionPreventionandControl practices that need to be in place in the management of VHFs?
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf