Skip to content
Browse files

Bufix: proper variable names help.

  • Loading branch information...
1 parent 30bf8c9 commit 76d1e0ab6fd6cf784be425a175a9cddac2a00dcc @wayneeseguin wayneeseguin committed Mar 24, 2011
Showing with 11 additions and 7 deletions.
  1. +7 −3 redis/bin/install
  2. +4 −4 redis/templates/redis.init.template
View
10 redis/bin/install
@@ -8,6 +8,7 @@ setup_redis_user()
"OpenBSD")
groupadd "$redis_user"
useradd -g "$redis_user" "$redis_user" -s /bin/bash
+ usermod -s /bin/bash "$redis_user"
;;
"FreeBSD")
pw groupadd -q "$redis_user"
@@ -18,7 +19,8 @@ setup_redis_user()
else
groupadd -f "$redis_user"
fi
- useradd -g "$redis_user" -s /sbin/nologin -d /var/lib/redis "$redis_user"
+ useradd -g "$redis_user" -s /bin/bash -d /var/lib/redis "$redis_user"
+ usermod -s /bin/bash "$redis_user"
;;
"Darwin")
@@ -38,11 +40,13 @@ setup_redis_user()
dscl . -create "/Groups/$redis_user" gid "$gid"
# ????
- # useradd -g "$redis_user" -s /sbin/nologin -d /var/lib/redis "$redis_user"
+ # useradd -g "$redis_user" -s /bin/bash -d /var/lib/redis "$redis_user"
+ # usermod -s /bin/bash
;;
"SunOS")
groupadd "$redis_user"
- useradd -g "$redis_user" -s /sbin/nologin -d /var/lib/redis "$redis_user"
+ useradd -g "$redis_user" -s /bin/bash -d /var/lib/redis "$redis_user"
+ usermod -s /bin/bash "$redis_user"
;;
esac
) || true # Ignore failures with this for now...
View
8 redis/templates/redis.init.template
@@ -61,12 +61,12 @@ redis_start()
if [[ -s "$pidfile" ]] ; then
fail "$pidfile exists, redis-server is either already running or crashed.\n"
else
- log "#starting Redis as $redis_user using $redis_config..."
+ log "#starting Redis as $redis_user using $redis_config_file..."
if [[ "$redis_user" != "$USER" ]] ; then
- su "$redis_user" -c "\"$redis_server_binary\" \"$redis_config\""
+ su "$redis_user" -c "\"$redis_server_binary\" \"$redis_config_file\""
else
- "$redis_server_binary" "$redis_config"
+ "$redis_server_binary" "$redis_config_file"
fi
fi
return $?
@@ -75,7 +75,7 @@ redis_start()
redis_stop()
{
if [[ -s "$pidfile" ]] ; then
- log "#stopping Redis as $redis_user using $redis_config..."
+ log "#stopping Redis as $redis_user using $redis_config_file..."
"${redis_server_binary/%server/cli}" shutdown

0 comments on commit 76d1e0a

Please sign in to comment.
Something went wrong with that request. Please try again.