|
@@ -1,7 +1,8 @@
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
-# Check if the script is running on Linux
|
|
|
-if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
|
+if [ "$(uname)" == "Darwin" ]; then
|
|
|
+ echo "This script is designed for Linux and may not work properly on macOS."
|
|
|
+else
|
|
|
# Get the IP address from the Docker container
|
|
|
docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}')
|
|
|
|
|
@@ -20,11 +21,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
|
sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT
|
|
|
echo "Port 9003 has been opened for xdebug."
|
|
|
fi
|
|
|
-elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
- echo "This script is designed for Linux and may not work properly on macOS."
|
|
|
-else
|
|
|
- echo "Unsupported operating system."
|
|
|
fi
|
|
|
|
|
|
echo "Tasks completed successfully"
|
|
|
-
|