ps=`ps -efl|grep redis|grep -v $0|grep -v grep|wc -l`if [ $ps -eq 0 ];thenecho -e "\n$(date '+%Y-%m-%d %H:%M:%S') start "/etc/init.d/redis startecho "$(date '+%Y-%m-%d %H:%M:%S') done"elseecho $(date +%F%n%T) "redis正在运行..."exit 0;fips=`ps -efl|grep redis|grep -v $0|grep -v grep|wc -l` if [ $ps -eq 0 ]; then echo -e "\n$(date '+%Y-%m-%d %H:%M:%S') start " /etc/init.d/redis start echo "$(date '+%Y-%m-%d %H:%M:%S') done" else echo $(date +%F%n%T) "redis正在运行..." exit 0; fips=`ps -efl|grep redis|grep -v $0|grep -v grep|wc -l` if [ $ps -eq 0 ]; then echo -e "\n$(date '+%Y-%m-%d %H:%M:%S') start " /etc/init.d/redis start echo "$(date '+%Y-%m-%d %H:%M:%S') done" else echo $(date +%F%n%T) "redis正在运行..." exit 0; fi
Be happy. No worries, just smile.
开心点,别担心,微笑就好
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容