Skip to content

Instantly share code, notes, and snippets.

@WhiteyDude
Created November 15, 2018 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WhiteyDude/13e4a884fc0cef08d8639a4808817f5c to your computer and use it in GitHub Desktop.
Save WhiteyDude/13e4a884fc0cef08d8639a4808817f5c to your computer and use it in GitHub Desktop.
#!/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