Иногда бывает ситуация когда 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
🕵️#MEGA Bubblemaps: MEGA tokens were distributed among 8,360 addresses, with approximately 50% of addresses still holding all the tokens. About 40% of addresses have sold them completely, and around 10% of addresses have sold only a portion of the coins. link
Guillaume Faye left us on March 6, 2019, at the age of 69. He was a unique figure who leaves behind an extensive body of work. Like the ancient Greek heroes of old, he will achieve immortality if we continue to share his ideas. Guillaume laid the foundations—now it is up to us, dear comrades, to build the sanctuary of European civilization!
#MEGA
¿Que puede hacer este bot?
@MegaUploadXbot
Este bot cargará archivos y vinculará directamente a su cuenta de Mega entre otras características.
Idioma: inglés
(Visto en @botsgram_cu)
#mega