Иногда бывает ситуация когда 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
#XTZ/USDT analysis :
#XTZ is in an uptrend and has broken out above the 200 EMA and previous highs. Currently, the price is retesting the previous resistance zone, which has now turned into support. It is anticipated that the price will rebound from this level and resume bullish momentum to test the previous highs.
TF : 1D
Entry : $1.012
Target : $1.800
SL : $0.783
#XTZ/USDT analysis :
#XTZ has broken below the 200 EMA and has retested it. Currently, the price is encountering resistance from the resistance zone, and it is expected to decline from here. A drop is anticipated, potentially leading to a test of previous lows.
TF : 2H
Entry : $1.420
Target : $1.150
SL : $1.530
#XTZ/USDT analysis :
#XTZ has broken out and retested the previous swing high and the 200 EMA. The price is expected to bounce back from this level and test the higher levels.
TF : 4H
Entry : $0.694
Target : $0.744
SL : $0.661
#XTZ/USDT analysis :
#XTZ is again approaching the 200 EMA resistance after facing rejection from there and is expected to continue its bearish momentum once the zone is tested. The previous low will be the target level.
TF : 2H
Entry : $0.687
Target : $0.591
SL : $0.709