Иногда бывает ситуация когда 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
🚀🚀 Storming Profits in the Premium Group
🎯🎯#GUN/USDT has covered all the targets to give an amazing profit of 51% for all Premium Members
👁🗨Contact @futurechief to enter the premium group & make daily gains on Futures as well as Spot Market
🎯🎯Excellent 51% Profit on #GUN/USDT for all Premium Members
🚀🚀It has crossed all the targets
👁🗨Contact @futurechief to enter the premium group & make daily gains
🚀 Back to Back Huge Profits are made in the Premium Group
🎯🎯#GUN/USDT has covered all the target to give a Profit of 201% to all Premium Members
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gain
📈 TRADE RESULT – #GUN/USDT
✔️ Entry worked well
✔️ All targets were reached
✔️ Risk was managed properly
Result: +64% (with leverage)
How we trade:
• Plan before entering
• Fix targets and stop-loss
• No emotional trading
Premium means smart and disciplined trading.