Иногда бывает ситуация когда 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
Municipal elections are underway in Venezuela to renew 335 mayoral seats and 2,471 local council posts.
Venezuelanalysis' Andreína Chávez files this report from the Libertador municipality in Caracas.
#MunicipalElections#Venezuela#LocalPolitics
📷 NEWS | Chavismo and Opposition Urge Voters to Participate in Final Campaign Push Ahead of Municipal Elections
On Sunday, Venezuelans will elect 335 mayors and 2,471 municipal councillors. The vote marks the culmination of Venezuela’s electoral cycle, following last year’s presidential election and the recent legislative and regional races, both of which yielded favourable outcomes for the ruling United Socialist Party (PSUV) and allied organizations.
Chavismo and opposition candidates wrapped up the 14-day campaign on Thursday with large rallies nationwide. Currently, two-thirds of the country's 335 municipalities are under Socialist control, while opposition factions hold over 100 mayoralties.
Read our report (+photos): https://venezuelanalysis.com/images/chavismo-and-opposition-urge-voters-to-participate-in-final-campaign-push-ahead-of-municipal-elections/
#MunicipalElections#Chavismo#Opposition#Venezuela
📝 INTERVIEW | Building Communal Power from the Mayor’s Office: A Conversation with Lisbed Carolina Parada
With municipal elections scheduled for Sunday, July 27, VA interviewed Lisbed Carolina Parada, mayoral candidate in the town of Urachiche, Yaracuy state.
A longtime communal activist, Parada discussed the need to put institutional spaces at the service of popular power in the territories.
Follow the link to read the interview: https://venezuelanalysis.com/interviews/building-communal-power-from-the-mayors-office-a-conversation-with-lisbed-carolina-parada/
#MunicipalElections#PopularPower#Urachiche#Communes