Skip to content

Commit

Permalink
Merge pull request #103
Browse files Browse the repository at this point in the history
feat: 🎸 tips of port check
  • Loading branch information
ZingerLittleBee authored Aug 11, 2024
2 parents f24c0f1 + 2671bde commit bfce6b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ installation() {
# check if port is available, if not, input another port
while true; do
if [[ $(netstat -an | grep -c "$port") -eq 0 ]]; then
echo -e "Congratulations, port $port is available."
break
else
echo -e "${ERROR}Port $port is already in use, please try another port.${NC}"
Expand All @@ -99,6 +100,8 @@ installation() {
fi
fi
done
else
echo -e "${WARNING}netstat not found, please check if port $port is available manually.${NC}"
fi

echo -e "Enable auto start on boot? (y/n)"
Expand Down

0 comments on commit bfce6b1

Please sign in to comment.