P=$(status |/bin/grep $INS |/bin/awk '{print $1}')
if [ -z "$P" ]; then
echo "'$INS' is not running."
else
/bin/kill -9 $P && echo "Stop '$INS' successfully." || echo "Stop '$INS' failed."
fi
else
echo "No redis named '$INS' to stop."
fi
shift
done
fi
;;
start)
if [ $# -eq 1 ]; then
start
else
shift
for INS in "$@"
do
if [ -d $PATH/$INS ]; then
P=$(status |/bin/grep $INS |/bin/awk '{print $2}')
if [ -n "$P" ]; then
echo "'$INS' is running. Stop it first."
elif
/usr/bin/nohup /usr/local/bin/redis-server $PATH/$INS/redis.conf >/dev/null 2>&1 &
then