Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
if [ -z $1 ]; then
echo "Syntax is $0 <port>"
exit 1
fi
if [ -f "/var/run/redis_$1.pid" ]; then
#pid=`cat /var/run/redis_$1.pid`
# kill -15 $pid
redis-cli -p $1 shutdown
fi
/usr/local/bin/redis-server /etc/redis/$1.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment