Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba07f85fd8 |
26
install_v.sh
26
install_v.sh
@@ -375,11 +375,29 @@ check_and_start_redis() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ "${OSNAME}" == "darwin"* ]]; then
|
elif [[ "${OSNAME}" == "darwin"* ]]; then
|
||||||
if brew services list | grep -q "^redis.*started"; then
|
# Check if we're in GitHub Actions
|
||||||
echo "redis is already running."
|
if is_github_actions; then
|
||||||
|
echo "Running in GitHub Actions on macOS. Starting redis directly..."
|
||||||
|
if pgrep redis-server > /dev/null; then
|
||||||
|
echo "redis is already running."
|
||||||
|
else
|
||||||
|
echo "redis is not running. Starting it in the background..."
|
||||||
|
redis-server --daemonize yes
|
||||||
|
if pgrep redis-server > /dev/null; then
|
||||||
|
echo "redis started successfully."
|
||||||
|
else
|
||||||
|
echo "Failed to start redis. Please check logs for details."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "redis is not running. Starting it..."
|
# For regular macOS environments, use brew services
|
||||||
brew services start redis
|
if brew services list | grep -q "^redis.*started"; then
|
||||||
|
echo "redis is already running."
|
||||||
|
else
|
||||||
|
echo "redis is not running. Starting it..."
|
||||||
|
brew services start redis
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ "${OSNAME}" == "alpine"* ]]; then
|
elif [[ "${OSNAME}" == "alpine"* ]]; then
|
||||||
if rc-service "redis" status | grep -q "running"; then
|
if rc-service "redis" status | grep -q "running"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user