Иногда бывает ситуация когда 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
'Our children are next' fear #Kenyans as #drought wipes out livestock
In drought-hit northeastern Kenya, villagers have been forced to drag their dead livestock to distant fields for burning to keep the stench of death and scavenging hyenas away from their homes.
Mandera county along Kenya's borders with Ethiopia and Somalia has seen no rain since May and is now on the point of a full-blown water emergency.
"I have lost all my cows and goats, and burned them here," Bishar Maalim Mohammed, 60, a resident of Tawakal village, told AFP.
In his village, where most are pastoralists relying heavily on their animals, the only remaining bull can no longer stand. He has lain in the same spot for nearly a week, severely dehydrated with bones protruding through his skin, as his owner watches helplessly.
https://addisstandard.com/?p=55089
#China executes 11 gang members who lured #Kenyans to #Myanmar scam compounds
China has executed 11 members of a criminal gang convicted of luring foreigners—including Kenyans—into scam compounds in Myanmar, where they ran a billion-dollar online fraud and illegal gambling network.
The criminal syndicate was convicted of running a vast online fraud and illegal gambling operation that generated more than $14 billion, according to state media and court records.
The executions approved by China's Supreme Peoples Court and carried out in eastern #Zhejiang province underscore Beijing' intensifying crackdown on transnational crime networks operating across Southeast Asia, These networks have increasingly affected victims and financial systems far beyond the region including in Africa.
Chinese authorities said the defendants were key figures in the so-called Ming family criminal group .....
https://web.facebook.com/AddisstandardEng/posts/pfbid0Txiw6s8otRMFRWz7hk7ioaecYZkBNx1cMqVXPy67uL3pPMJaJZA2fGQyqs8aymkSl