Иногда бывает ситуация когда 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
NGCam | XML
Channel for user xml configs for Google Camera 7.4 by Nikita. You will find all configs created for supported devices.
All files will be send to the bot and posted in the channel according to the requirements.
NOTE: Use hashtags there. Starting with#pinned
For our subscribers who may be too busy/occupied and cannot follow the signals every time, you can take great advantage with the investment service.
The package works perfectly for busy traders, beginners or anyone who doesn't want to take risks while trading personally..
You make an investment with us and we trade for you, after 6 to 10 days we return with profits directly to your account/wallet provided.😍✅
If you're interested, send message
Click on the #pinned message and contact #admin
100% GUARANTEED PROFITS ❤️💯
I assure you, this is an opportunity you'll love🤩
@DeleteEventsBot
Qué puede hacer este bot?
Este bot elimina mensajes de eventos (también conocidos como mensajes de acción) en supergrupos.
Idioma: Inglés
(visto en @BotsGram_cu)
#delete, #service, #message, #spam, #helper, #group, #supergroup, #join, #left, #pinned