Иногда бывает ситуация когда 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
#SXP/USDT analysis :
#SXP has broken out of the trendline, and the price has also rebounded from the support zone following a period of sideways consolidation. It is anticipated that the price will continue to rise from the current level and test previous swing highs.
TF : 1D
Entry : $0.3240
Target : $0.5629
SL : $0.2055
#SXP/USDT analysis :
#SXP has bounced back from the 200 EMA after a retracement and a breakout of the trendline. It is now expected to move towards the previous swing high level.
TF : 2H
Entry : $0.2592
Target : $0.2894
SL : $0.2495
#SXP/USDT analysis :
#SXP is presently in an uptrend, forming higher highs (HHs) and higher lows (HLs). It is expected to experience a pullback near its support zone and is likely to bounce back from there to test higher levels.
TF : 1h
Entry : $0.2416
Target : $0.2538
SL : $0.2339
✅✅ 150% Profit on #SXP/USDT for our Premium Members on Binance Futures/Bybit Futures/OKX Futures& KuCoin Futures
👁🗨Contact @primemod to enter the premium group & make daily profit
#SXP bounced from the support zone on Weekly time frame,now price is trying to break up the falling wedge pattern, breakout incoming..
📈
❄️@signal_bitcoins❄️
❄️@Shadow_support0o❄️