Permalink
Browse files

More work on Redis extension.

  • Loading branch information...
1 parent 0bc989f commit 37a1d0680120b9222d1555f4b21f010e1c51233b @wayneeseguin wayneeseguin committed Mar 24, 2011
Showing with 48 additions and 6 deletions.
  1. +1 −3 redis/bin/help
  2. +9 −0 redis/bin/info
  3. +2 −3 redis/bin/install
  4. +9 −0 redis/bin/restart
  5. +9 −0 redis/bin/setup
  6. +9 −0 redis/bin/start
  7. +9 −0 redis/bin/stop
View
@@ -13,9 +13,7 @@ actions()
start - Startup redis.
stop - Stop redis.
restart - Restart redis.
- server <project_name> - Add and enable a new server(s)
- enable <project_name> - Enable project server config.
- disable <project_name> - Disable project server config.
+ info - Display redis server INFO
help - Display this help text.
"
}
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+source "${extension_scripts_path}/initialize"
+
+if [[ -x "${init_scripts_path}/redis" ]] ; then
+ exec "${init_scripts_path}/redis" info
+else
+ fail "${init_scripts_path}/redis script is missing or not executable."
+fi
View
@@ -73,8 +73,7 @@ extract_redis()
build_redis()
{
- cd ${package}-${version}
- if [[ $? -gt 0]] ; then
+ if ! cd ${package}-${version} ; then
fail "Could not enter extracted ${package}-${version} source directory."
fi
@@ -121,4 +120,4 @@ create_redis_directories
install_init_script
-exit $result
+exit 0
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+source "${extension_scripts_path}/initialize"
+
+if [[ -x "${init_scripts_path}/redis" ]] ; then
+ exec "${init_scripts_path}/redis" restart
+else
+ fail "${init_scripts_path}/redis script is missing or not executable."
+fi
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+cp -f "$extension_templates_path/redis.init.template" \
+ "${init_scripts_path}/redis"
+
+[[ -s "${init_scripts_path}/redis" && ! -x "${init_scripts_path}/redis" ]] &&
+ chmod +x "${init_scripts_path}/redis"
+
+# TODO: Install redis.conf
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+source "${extension_scripts_path}/initialize"
+
+if [[ -x "${init_scripts_path}/redis" ]] ; then
+ exec "${init_scripts_path}/redis" start
+else
+ fail "${init_scripts_path}/redis script is missing or not executable."
+fi
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+source "${extension_scripts_path}/initialize"
+
+if [[ -x "${init_scripts_path}/redis" ]] ; then
+ exec "${init_scripts_path}/redis" stop
+else
+ fail "${init_scripts_path}/redis script is missing or not executable."
+fi

0 comments on commit 37a1d06

Please sign in to comment.