Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

script for restart redis service automatically

#!/bin/bash
a=$(redis-cli -p 6379 PING)
if [ "$a" = "PONG" ]
then
    echo 'Already running'
else
    b=$(/etc/init.d/redis_6379 start)   
    echo $b
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #script #restart #redis #service #automatically
ADD COMMENT
Topic
Name
5+1 =