Иногда бывает ситуация когда 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
Any form of meningitis is a medical emergency.
Download our latest #CerebrospinalMeningitis situation report for a summary of the disease situation and our response activities
🔗
https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
We have published our latest situation report on #CerebrospinalMeningitis.
This report provides a summary of the current epidemiological situation in Nigeria, and our preparedness and response activities.
🔗https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
#TakeResponsibility
The highest burden of #CerebrospinalMeningitis in Nigeria occurs in the “Meningitis Belt” which includes all 19 states in the Northern region, the FCT, and some southern states.
Ensure you and your loved ones have received the appropriate vaccination required to protect against #meningitis
Public Health Advisory: https://ncdc.gov.ng/news/508/cerebrospinal-meningitis-public-health-advisory
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete the routine immunisation for your children or wards to keep them safe and #healthy.
#TakeResponsibility
#CerebrospinalMeningitis (CSM) is an easily transmissible disease with confirmed cases reported all year round in Nigeria.
Download our latest #CSM situation report for a summary of the disease situation and our response activities
🔗https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
#TakeResponsibility
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete Nigeria's routine immunisation schedule for your children or wards to keep them safe and #healthy.
#DefeatMeningitis
Are you familiar with the signs of #Meningitis in ADULTS?
Know the signs and symptoms to report early to a healthcare facility when noticed.
#CerebrospinalMeningitis is a MEDICAL EMERGENCY!
#StaySafeStayHealthy#WorldMeningitisDay
🔗
https://youtu.be/ZhZdin-Cn9s?feature=shared
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete Nigeria's routine immunisation schedule for your children or wards to keep them #safe from vaccine-preventable diseases.
#DefeatMeningitis
#WorldMeningitisDay