Files
cody-crm/installer/shells/start-redis.sh
wangziqi 72e2110987
Some checks failed
Synchronize to Gitee / repo-sync (push) Has been cancelled
Typos Checking / Spell Check with Typos (push) Has been cancelled
chore: initial commit
2026-06-23 11:56:23 +08:00

19 lines
482 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -e # 遇到错误立即退出
# 日志函数
log() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1"
}
bash /shells/init-directories.sh
# 检查 Redis 密码
if [ -z "${REDIS_PASSWORD}" ]; then
log "警告REDIS_PASSWORD 环境变量未设置,使用默认密码 CordysCRM@redis"
REDIS_PASSWORD="CordysCRM@redis"
fi
# 启动 Redis 服务器
log "启动 Redis 服务器..."
redis-server /opt/cordys/conf/redis/redis.conf --requirepass "${REDIS_PASSWORD}"