Иногда бывает ситуация когда 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
#GRT/USDT analysis :
#GRT has broken out of its trendline with strong momentum following a bounce back from the support zone. The price is expected to maintain its bullish momentum and test previous highs. The current level presents a favorable entry opportunity.
TF : 1W
Entry : $0.2023
Target : $0.3446 and $0.4902
SL : $0.1450
#GRT/USDT analysis :
#GRT is currently in a downtrend, making lower lows (LLs) and lower highs (LHs), and is trading below the 200 EMA. The price is facing rejection from both the 200 EMA and the resistance zone. It is expected to decline from this point and potentially test the previous swing low.
TF : 1D
Entry : $0.1682
Target : $0.1294
SL : $0.1940
💰#GRT has a falling wedge pattern on 8H Time frame, we expec it will pump alot in the case of breakout, waiting now..⌛️
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
💰#GRT bounced back from the Support zone on 12H Time frame, we are waiting for breakup and pullback to the broken trendline 💫
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️