当前位置:网站首页>Redis batch startup and shutdown script
Redis batch startup and shutdown script
2022-07-03 07:45:00 【Lao Wang's notes】
Redis Multi instance deployment , Often, multiple sets will be deployed in a single machine Redis example , For each Redis It takes time to stop living and start ; Hereby, a batch startup and shutdown script is prepared
#!/bin/bash
info="""
=======================
sh service.sh start
sh service.sh stop
======================
"""
start()
{
for x in `ls /export/data/redis/63*.conf`;do echo $x;/usr/local/bin/redis-server $x;done
echo "redis started"
}
stop()
{
ps -ef | grep redis-server | awk '{print $2}' | xargs kill -9
echo "redis stoped"
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
*)
echo $info
;;
esac
The operation effect is as follows :
边栏推荐
- opensips与对方tls sip trunk对接注意事项
- JUnit unit test of vertx
- An overview of IfM Engage
- 图像识别与检测--笔记
- C2 several methods of merging VCF files
- Research shows that breast cancer cells are more likely to enter the blood when patients sleep
- Go language foundation ----- 13 ----- file
- [MySQL 11] how to solve the case sensitive problem of MySQL 8.0.18
- 技术干货|AI框架动静态图统一的思考
- GoLang之结构体
猜你喜欢
技术干货|百行代码写BERT,昇思MindSpore能力大赏
Redis批量启停脚本
HDMI2.1与HDMI2.0的区别以及转换PD信号。
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
Go language foundation ------17 ----- channel creation, read-write, security shutdown, multiplexing select
Go language foundation ----- 05 ----- structure
Go language foundation ----- 09 ----- exception handling (error, panic, recover)
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
【LeetCode】2. Valid parentheses · valid parentheses
Pat class a 1032 sharing
随机推荐
技术干货|昇思MindSpore算子并行+异构并行,使能32卡训练2420亿参数模型
Pat class a 1030 travel plan
Go language foundation ----- 10 ----- string related operations (operation function, string conversion)
[MySQL 12] MySQL 8.0.18 reinitialization
Sent by mqtt client server of vertx
Hnsw introduction and some reference articles in lucene9
Industrial resilience
static关键字
【MySQL 12】MySQL 8.0.18 重新初始化
华为交换机基础配置(telnet/ssh登录)
go语言-循环语句
PAT甲级 1031 Hello World for U
Project experience sharing: Based on mindspore, the acoustic model is realized by using dfcnn and CTC loss function
圖像識別與檢測--筆記
【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题
Pgadmin 4 v6.11 release, PostgreSQL open source graphical management tool
opensips与对方tls sip trunk对接注意事项
[Development Notes] cloud app control on device based on smart cloud 4G adapter gc211
Go language foundation ----- 11 ----- regular expression
OSPF experiment