Skip to content

Commit 94f9b99

Browse files
authored
Update configure-linux
Standardized OS check
1 parent 3313f67 commit 94f9b99

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

compose/bin/configure-linux

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env bash
22

3-
# Check if the script is running on Linux
4-
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
3+
if [ "$(uname)" == "Darwin" ]; then
4+
echo "This script is designed for Linux and may not work properly on macOS."
5+
else
56
# Get the IP address from the Docker container
67
docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}')
78

@@ -20,11 +21,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
2021
sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT
2122
echo "Port 9003 has been opened for xdebug."
2223
fi
23-
elif [[ "$OSTYPE" == "darwin"* ]]; then
24-
echo "This script is designed for Linux and may not work properly on macOS."
25-
else
26-
echo "Unsupported operating system."
2724
fi
2825

2926
echo "Tasks completed successfully"
30-

0 commit comments

Comments
 (0)