Иногда бывает ситуация когда 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
#ONE/USDT analysis :
#ONE has broken out of the trendline following a bounce from the support zone, accompanied by a strong volume candle. The price is expected to continue its bullish momentum soon and test the previous highs. A potential gain of +1100% is anticipated from the current level.
TF : 1M
Entry : $0.03000
Target : $0.37897
SL : $0.02100
#ONE/USDT analysis :
#ONE is currently forming a structure of higher highs (HHs) and higher lows (HLs) above the 200 EMA. The price is anticipated to sustain its momentum and reach new highs. Wait for a pullback to enter long positions.
TF : 1H
Entry : $0.0113
Target : $0.0122
SL : $0.0108
#ONE/USDT analysis :
#ONE is currently consolidating sideways within the support and resistance zone. At the moment, the price is bouncing off the support zone and is expected to test the resistance zone.
TF : 4H
Entry : $0.0104
Target : $0.0110
SL : $0.0100
#ONE/USDT analysis -
#ONE is in a downtrend making lower lows (LLs) and lower highs (LHs). The price is currently facing resistance and is expected to be rejected from there, continuing its bearish momentum to test previous lows.
TF : 4h
Entry : $0.0150
Target : $0.0133
SL : $0.0162