Иногда бывает ситуация когда 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
#FET/USDT Analysis-
The price has formed a symmetrical triangle pattern. Given the current bullish market scenario, there is a high probability of an upward breakout.
If the breakout occurs, the price is likely to rally toward the target zone from the breakout point.
T.F.- 1-D
ENTRY- as soon as it gives breakout
SL- 1.2
TARGET- 2.04
Note: If the stop-loss is triggered before entry, disregard the trade as the price action may develop differently.
#FET/USDT analysis :
#FET has broken down the 200 EMA and previous support levels. It is now undergoing a pullback and retesting the resistance zone. The price is expected to reject from there and bounce back to continue its bearish momentum.
TF : 1H
Entry : $1.170
Target : $1.057
SL : $1.252