Иногда бывает ситуация когда 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
#NEO/USDT analysis :
#NEO is currently in an uptrend, having retraced to test a previously respected support zone. The price is expected to rebound from this level and continue its upward movement to retest previous highs.
TF : 1D
Entry : $14.00
Target : $26.21
SL : $10.50
#NEO/USDT analysis :
#NEO is currently approaching support zone. Price is expected to rebound from this zone and resume its bullish momentum to test previous highs.
TF : 2H
Entry : $19.17
Target : $23.80
SL : $17.12
#NEO/USDT analysis :
#NEO is currently in a downtrend, forming lower lows (LLs) and lower highs (LHs) structure. The price has broken the trendline and is expected to rise higher during the correction phase, testing the previous swing high.
TF : 1h
Entry : $9.24
Target : $9.61
SL : $8.99
#NEO/USDT analysis :
#NEO is presently in a downtrend, trading below the 200 EMA. The price is anticipated to maintain its bearish momentum and revisit previous lows. To contemplate initiating a short position, it is recommended to wait for a retracement and a retest of the established resistance level.
TF : 4h
Entry : $24.05
Target : $9.73
SL : $10.03