Skip to content

Commit

Permalink
Merge pull request #647 from midoks/dev
Browse files Browse the repository at this point in the history
valkey命令加入
  • Loading branch information
midoks authored Dec 18, 2024
2 parents 58027e4 + e5585ca commit 20c1cea
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
mw default | 显示登录信息
mw db | 快捷连接MySQL
mw redis | 快捷连接Redis
mw valkey | 快捷连接valkey
mw mongodb | 快捷连接MongoDB
mw pgdb | 快捷连接PostgreSQL
----------------------------------------
Expand Down
19 changes: 19 additions & 0 deletions scripts/init.d/mw.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,24 @@ mw_redis(){
${CLIEXEC}
}

mw_valkey(){
CONF="${ROOT_PATH}/valkey/valkey.conf"

if [ ! -f "$CONF" ]; then
echo -e "not install valkey!"
exit 1
fi

REDISPORT=$(cat $CONF |grep port|grep -v '#'|awk '{print $2}')
REDISPASS=$(cat $CONF |grep requirepass|grep -v '#'|awk '{print $2}')
if [ "$REDISPASS" != "" ];then
REDISPASS=" -a $REDISPASS"
fi
CLIEXEC="${ROOT_PATH}/valkey/bin/valkey-cli -p $REDISPORT$REDISPASS"
echo $CLIEXEC
${CLIEXEC}
}

mw_venv(){
cd ${PANEL_DIR} && source bin/activate
}
Expand Down Expand Up @@ -622,6 +640,7 @@ case "$1" in
'db') mw_connect_mysql;;
'pgdb') mw_connect_pgdb;;
'redis') mw_redis;;
'valkey')mw_valkey;;
'mongodb') mw_mongodb;;
'venv') mw_update_venv;;
'clean_lib') mw_clean_lib;;
Expand Down
2 changes: 1 addition & 1 deletion web/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 应用程序版本号组件
APP_RELEASE = 0
APP_REVISION = 18
APP_SMALL_VERSION = 1
APP_SMALL_VERSION = 0

# 应用程序版本后缀,例如“beta1”、“dev”。通常为空字符串GA发布
APP_SUFFIX = ''
Expand Down

0 comments on commit 20c1cea

Please sign in to comment.