Иногда бывает ситуация когда 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
#CITY/USDT analysis :
#CITY has broken out and retested the 200 Exponential Moving Average (EMA). It is currently consolidating above the 200 EMA. The price is expected to bounce back from this level and resume its upward momentum to test higher levels.
TF : 1H
Entry : $1.107
Target : $1.160
SL : $1.075
#CITY/USDT analysis :
#CITY is currently in a downtrend, establishing new lows. The price is anticipated to retest the resistance zone before potentially reversing from there to resume bearish momentum and test lower levels.
TF : 4h
Entry : $1.220
Target : $1.083
SL : $1.300
#CITY/USDT analysis :
#CITY has broken below the support levels, forming lower lows (LLs) and lower highs (LHs) while trading below the 200 EMA. The price is expected to maintain its bearish momentum and test lower levels.
TF : 2H
Entry : $1.826
Target : $1.715
SL : $1.903
#CITY/USDT analysis :
#CITY is presently in a downtrend, trading below the 200 EMA. The price is currently consolidating above support levels. It is expected to be breached by the price soon and will continue its bearish momentum on lower time frames to test previous lows. Wait for a break of the $1.945 level to initiate a short position.
TF : 1H
Entry : $1.945
Target : $1.853
SL : $2.005