Иногда бывает ситуация когда 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
Who is a real #Muslim?
People who are independent. They are not affiliated with the United States. Their leaders are not chosen by the #Illuminati. If a Muslim is attacked in another country, they will help them. Economic embargo and war cannot weaken their faith.
They live in Yemen and will carry out a great responsibility in the events of the apocalypse.
https://t.me/YediotNewsChat
In the Palestinian war with the Jewish terrorists, the people of the world changed their attitude.
The people of the world used to receive news from official media and government-affiliated organizations. News agencies such as Associated Press, France Press, United Press, Reuters and many major news agencies in the world are in the hands of #Zionists.
But in the Palestine war, the people of the world turned to individual media such as Telegram, Twitter and Tik Tok to discover the truth. The social networks that were built for the #Illuminati to dominate have become the nightmare of the #Freemasons.
https://t.me/YediotNewsChat
The #Jewish media empire portrays Iranophobia in the world.
This tourist was told that Iran is a dangerous country, but upon entering Iran, he was surprised by the Zionists' false propaganda against Iran.
Imperialists and #Freemasons do not want the people of the world to know Iranian civilization. Because Iranian culture wants to destroy the #Illuminati.
https://t.me/YediotNewsChat
Some news sources say that the price of internet has increased in some Muslim countries.
Social networks and individual media have become an important tool to deal with the #Zionists. Because the state media is under the control of the #Jews. Official and government news agencies publish selected news in favor of the Zionists. But social networks publish real news.
Individual media are putting pressure on Israel. They have increased the price of the Internet to reduce the activity of individual media.
Every word and picture published against the Zionists will hit the body of #Illuminati and #Freemasonry like a bullet.
https://t.me/YediotNewsChat