chore: initial commit
This commit is contained in:
19
installer/shells/start-redis.sh
Executable file
19
installer/shells/start-redis.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/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}"
|
||||
Reference in New Issue
Block a user