Иногда бывает ситуация когда 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
The would-be #assassin of #Slovakian PM Robert #Fico has been identified as 71 year old Juraj #Cintula
He is alleged to be a supporter of the "#ProgressiveSlovakia" (PS) political party.
PS is pro-: neoliberalism, Eurocentrism, rearmament, #Russia sanctions and open borders.
Basically your average treacherous European-centrist party.
The 1st video above is from 2016, when Cintula was working for the security company #SBS and was briefly in the press because he had overpowered a rioter.
The 2nd video seems to have been taken today, 15th of May 2024, shortly after he was apprehended by Slovakian #Police, and appears to be videoed in either a Hospital or in a Police Station
Cintula is explaining his motives for shooting Fico
#Slovakian prime minister Robert #Fico shot and rushed to hospital after ‘attempted assassination’
Fico was shot in the town of #Handlova with a man detained at the scene
•In 2022 and 2023, Fico was a loud critic of the #VonderLeyen Commission and her foreign and #military policies in relation to #Russian invasion of #Ukraine.
He also expressed disagreements with the Commission in questions of #immigration.
•In December 2023, Fico criticized the "hypocrisy" of the EU, which was reluctant to talk about #Israeli#WarCrimes in #Gaza
•In 2023, Fico said #Ukraine's #Azov Battalion was "clearly a #fascist regiment".
•During a rally on 30 August, he also said that the War in Donbas started in 2014 when "Ukrainian #Nazis and fascists started murdering the Russian population of #Donbas"