Иногда бывает ситуация когда 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
#FXS/USDT analysis :
#FXS has broken below the 200 EMA and the support zone. It is advisable to wait for a price retest of this zone for a potential short entry, as the price is anticipated to decline further, targeting lower levels.
TF : 4h
Entry : $3.455
Target : $2.400
SL : $3.945
#FXS/USDT analysis :
#FXS has successfully broken out and retested the swing high resistance following the breakout of the trendline in an established uptrend. The price is expected to sustain its bullish momentum and aim for previous highs.
TF : 30min
Entry : $4.762
Target : $5.080
SL : $4.526
#FXS/USDT analysis :
#FXS is currently in a downtrend and is expected to maintain its bearish momentum. For a short entry, wait for the price to break the current support zone, entering on a break below the $1.814 level. The previous lows will serve as target levels.
TF : 15min
Entry : $1.814
Target : $1.797
SL : $1.826
#FXS/USDT analysis :
#FXS is in a downtrend, forming lower lows (LLs) and lower highs (LHs) structure. The price is currently trading in the resistance zone near the 200 EMS. It is expected to be rejected from that area and continue its bearish momentum.
TF : 30min
Entry : $1.734
Target : $1.651
SL : $1.792