#!/bin/bash
bin代表binary,二进制文件
bash代表shell类型为bash,还有C shell等其他shell
定时重启redis
#! /bin/bash
## 检测redis如果挂了就立马启动
a=`ps aux|grep redis |awk '{print $1}'|grep root`
if [ -z $a ];
then
sudo service redis stop
sudo service redis start
fi
#!/bin/bash
bin代表binary,二进制文件
bash代表shell类型为bash,还有C shell等其他shell
定时重启redis
#! /bin/bash
## 检测redis如果挂了就立马启动
a=`ps aux|grep redis |awk '{print $1}'|grep root`
if [ -z $a ];
then
sudo service redis stop
sudo service redis start
fi