Иногда бывает ситуация когда 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
🚀 Back to Back profits are made in the Premium Group
🎯🎯#C98/USDT has covered all the target to give a Profit of 22% to all Premium Members
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gain
#C98/USDT analysis :
#C98 is currently in a bearish trend, consistently making new lows. The price is expected to test the resistance zone before resuming its bearish momentum.
TF : 1h
Entry : $0.0872
Target : $0.0822
SL : $0.0900
#C98
Coin98 has successfully broken above the descendingchannel formation on the daily timeframe👀
Now, the price is holding above the previous resistance-turned-supportlevel
A bounce from the support zone could push the price toward targets at $0.077, $0.093, and $0.130
#C98 result
1st target achieved in just 15 hours✅
One more quick profit 6%💰🤑
👉 More quick profit signals available in premium channel. Hurry up 🏃♂👇
☎️ Contact @FutureExpertAdmin