Иногда бывает ситуация когда 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
🔈 EPIC Listing Bonus: Deposit Events – Share 15,000 EPIC! 🎉
📣CoinEx is thrilled to announce the listing of EPIC! To celebrate, we’re launching an exclusive deposit event, giving you a chance to grab a share of 15,000 EPIC! 🔥
▶️ Deposit & Earn Up to 10% Cashback
📅 Duration: 8:00 Feb 6 – 8:00 Feb 13, 2025 (UTC)
🛡 Who’s eligible? New users registered after Feb 5, 2025 (UTC)
🎉Rewards:
🏆 Top 100: 10% cashback (Max 40 EPIC per user)
🎖 Next 400: 5% cashback (Max 15 EPIC per user)
📌 Limited to the first 500 qualified users!
📣 Join now and claim your rewards ▶️:
https://www.coinex.com/en/announcements/detail/34572280466580
✨✨✨✨✨✨✨✨
Use My Referral link to Sign Up:
https://www.coinex.com/register?rc=9qggk
🌹🌹🌹🌹🌹🌹🌹✨
#CoinExMining#CET#Launchpool#CryptoRewards#BullRun
🔼
🥰
😇
🥰
🥰
hits an Impressive 202.57% APY! 👀
📣CoinEx’s latest empowerment program is setting new records—this is the highest APY in 2 years!
▶️ Don’t miss CoinEx’s 6th Launchpool Event:
🎆Start with just 100 $CET
🟥Dive into a massive 13,000,000 $HOLD pool 💰
✅Estimated APY could soar as high as 103%! 😱
▶️Claim your $CET now: https://www.coinex.com/en/mining/6?pool=CET
Full details: https://www.coinex.com/en/announcements/detail/32916644706964
💥Ride the $CET wave : Earn rewards & benefit from its rising value!
CoinEx’s buyback strategy uses 20% of daily trading fees to repurchase $CET, which is
burned monthly until there’s no $CET left in circulation—creating a deflationary model. 🔥
Current burn rate: 72.15%! 🔥
✨✨✨✨✨✨✨✨
Use My Referral link to Sign Up:
https://www.coinex.com/register?rc=9qggk
🌹🌹🌹🌹🌹🌹🌹✨
#CoinExMining#CET#Launchpool#CryptoRewards#BullRun
🚀 CET Hits 197.73% APY!
CoinEx's empowerment program is crushing it—this is the highest APY in 2 years!
💥 Don’t miss CoinEx’s 5th Launchpool Event:
- Start with just 100 $CET
- Dive into a 10,000 $LKY pool 💰
- Estimated APY can reach as high as 224%! 😱
Snag your $CET now: https://www.coinex.com/en/mining/5?pool=CET
Full details: https://www.coinex.com/en/announcements/detail/32630651860500
Ride the $CET wave: Earn rewards and enjoy its rising value!
CoinEx employs a buyback strategy that utilizes 20% of daily trading fee income to repurchase CET, which is then burned monthly till there's no CET circulating in the market, creating a deflationary model. At present, the burning rate has reached 71%.
✨✨✨✨✨✨✨✨
Use My Referral link to Sign Up:
https://www.coinex.com/register?rc=9qggk
🌹🌹🌹🌹🌹🌹🌹✨
#CoinExMining#CET#Launchpool#CryptoRewards#BullRun