Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
fix sentinel pid and log locations in init script
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans-Joachim Skwirblies committed May 7, 2015
1 parent 2ba0f27 commit 7799819
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions manifests/sentinel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
$sentinel_name = $name,
$sentinel_port = 26379,
$sentinel_log_dir = '/var/log',
$sentinel_pid_dir = '/var/run',
$monitors = {
'mymaster' => {
master_host => '127.0.0.1',
Expand Down
4 changes: 2 additions & 2 deletions templates/etc/init.d/debian_redis-sentinel.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
# description: Redis Sentinel is a monitor for redis servers
# processname: redis-sentinel
# config: /etc/redis-sentinel_<%= @sentinel_name %>.conf
# pidfile: <%= @redis_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid
# pidfile: <%= @sentinel_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid

# Source function library.
. /lib/lsb/init-functions

REDIS_EXEC="<%= @redis_install_dir %>/redis-sentinel"
REDIS_NAME="redis-sentinel_<%= @sentinel_name %>"
REDIS_PID="<%= @redis_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid"
REDIS_PID="<%= @sentinel_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid"
REDIS_LOCKFILE="/var/lock/redis-sentinel_<%= @sentinel_name %>"
REDIS_CONF_FILE="/etc/redis-sentinel_<%= @sentinel_name %>.conf"

Expand Down
6 changes: 3 additions & 3 deletions templates/etc/init.d/redhat_redis-sentinel.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# processname: redis-server
# config: /etc/redis-sentinel_<%= @sentinel_name %>.conf
# config: /etc/sysconfig/redis
# pidfile: <%= @redis_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid
# pidfile: <%= @sentinel_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid

# Source function library.
. /etc/rc.d/init.d/functions
Expand All @@ -20,8 +20,8 @@

sentinel="<%= @redis_install_dir %>/redis-sentinel"
prog="redis-sentinel_<%= @sentinel_name %>"
pidfile="<%= @redis_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid"
logfile="<%= @log_dir -%>/redis-sentinel_<%= @sentinel_name %>.log"
pidfile="<%= @sentinel_pid_dir %>/redis-sentinel_<%= @sentinel_name %>.pid"
logfile="<%= @sentinel_log_dir -%>/redis-sentinel_<%= @sentinel_name %>.log"

SENTINEL_CONF_FILE="/etc/redis-sentinel_<%= @sentinel_name %>.conf"

Expand Down

0 comments on commit 7799819

Please sign in to comment.