Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More work on Redis installer.

  • Loading branch information...
commit 14476d507a3b678078b8bf42d48c863ed050625a 1 parent 37a1d06
@wayneeseguin wayneeseguin authored
Showing with 26 additions and 8 deletions.
  1. +1 −0  nginx/bin/start
  2. +8 −3 redis/bin/install
  3. +17 −5 redis/scripts/initialize
View
1  nginx/bin/start
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
+
source "$extension_scripts_path/initialize"
if [[ ${master_pid:-0} -gt 0 ]] ; then
View
11 redis/bin/install
@@ -1,7 +1,5 @@
#!/usr/bin/env bash
-if echo "$*" awk '/--trace/' ; then set -x ; fi
-
log() { printf "$*\n" ; return $? ; }
fail() { log "ERROR: $*" ; exit 1 ; }
@@ -15,11 +13,18 @@ setup_redis_user()
create_redis_directories()
{
- log "Creating directories ${package} ${version}...\n"
+ local directory redis_path
+
+ log "Creating paths for ${package} ${version}...\n"
+ # TODO: can likely merge directory creation into path creation.
for directory in "${directories[@]}" ; do
[[ ! -d "$directory" ]] && mkdir -p "$directory"
chown -R $user "$directory"
done
+
+ for redis_path in "${redis_paths[@]}" ; do
+ [[ ! -d "$redis_path" ]] && mkdir -p "$redis_path"
+ done
return 0
}
View
22 redis/scripts/initialize
@@ -54,19 +54,31 @@ fi
true ${src_path:="$prefix/src"}
# Redis Configuration.
-true ${redis_package_path="${src_path}/${package}-${version}"}
-true ${redis_src_path="${redis_package_path}/src"}
+true ${redis_package_path:="${src_path}/${package}-${version}"}
+true ${redis_src_path:="${redis_package_path}/src"}
true ${redis_install_path:="$prefix"}
true ${redis_bin_path:="${redis_install_path}/bin"}
true ${redis_config_path:="/etc/redis"}
true ${redis_config_file:="${redis_config_file:-"${redis_config_path}/redis.conf"}"}
true ${redis_servers_path:="$redis_etc_path/servers"}
+true ${redis_spool_path:="/var/spool/redis"}
+true ${redis_log_path:="/var/log/redis"}
true ${redis_server_binary:="${redis_bin_path}/redis-server"}
true ${redis_cli_binary:="${redis_bin_path}/redis-cli"}
true ${redis_pid_file:="/var/run/redis.pid"}
true ${redis_lock_file:="/var/lock/redis.lock"}
-true ${redis_spool_path:="/var/spool/redis"}
-true ${redis_log_path:="/var/log/redis"}
+
+redis_paths=(
+ "${redis_package_path}"
+ "${redis_src_path}"
+ "${redis_install_path}"
+ "${redis_bin_path}"
+ "${redis_config_path}"
+ "${redis_config_file}"
+ "${redis_servers_path}"
+ "${redis_spool_path}"
+ "${redis_log_path}"
+)
timestamp=$(date +%m.%d.%YT%H:%M:%S)
-redis_master_pid="$(ps auxww | awk "/[r]edis-server $redis_config_file/{print \$2}" | head -1)"
+redis_master_pid="$(ps auxww | awk "/[r]edis-server /{print \$2}" | head -1)"
Please sign in to comment.
Something went wrong with that request. Please try again.