le1t0-deprec 2.1.6.042 → 2.1.6.043

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,10 @@
1
1
  # deprec changelog
2
2
 
3
+ = 2.1.6.043 (Jul 26, 2010)
4
+
5
+ * add keepalived init script + log facility configurability
6
+ * small bugfix in syslog recipe
7
+
3
8
  = 2.1.6.042 (Jul 23, 2010)
4
9
 
5
10
  * small bugfix in syslog recipe
@@ -33,6 +33,8 @@ Capistrano::Configuration.instance(:must_exist).load do
33
33
  :scripts => :haproxy
34
34
  }
35
35
  }
36
+
37
+ set :keepalived_syslog_facility, nil # set to a number from 0 to 7 to use local0 - local7
36
38
 
37
39
  desc "Install keepalived on server"
38
40
  task :install, :roles => :failover do
@@ -48,6 +50,10 @@ Capistrano::Configuration.instance(:must_exist).load do
48
50
  {:template => 'keepalived.conf.erb',
49
51
  :path => '/etc/keepalived/keepalived.conf',
50
52
  :mode => 0644,
53
+ :owner => 'root:root'},
54
+ {:template => 'keepalived-init.erb',
55
+ :path => '/etc/init.d/keepalived',
56
+ :mode => 0755,
51
57
  :owner => 'root:root'}
52
58
  ]
53
59
 
@@ -0,0 +1,81 @@
1
+ #! /bin/sh
2
+ #
3
+ # keepalived LVS cluster monitor daemon.
4
+ #
5
+ # Written by Andres Salomon <dilinger@voxel.net>
6
+ #
7
+ ### BEGIN INIT INFO
8
+ # Provides: keepalived
9
+ # Required-Start: $syslog $network
10
+ # Required-Stop: $syslog $network
11
+ # Default-Start: 2 3 4 5
12
+ # Default-Stop: 0 1 6
13
+ # Short-Description: Starts keepalived
14
+ # Description: Starts keepalived lvs loadbalancer
15
+ ### END INIT INFO
16
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
+ DAEMON=/usr/sbin/keepalived
18
+ NAME=keepalived
19
+ DESC=keepalived
20
+ CONFIG=/etc/keepalived/keepalived.conf
21
+ TMPFILES="/tmp/.vrrp /tmp/.healthcheckers"
22
+
23
+ #includes lsb functions
24
+ . /lib/lsb/init-functions
25
+
26
+ set -e
27
+ test -f $CONFIG || exit 0
28
+ test -f $DAEMON || exit 0
29
+
30
+ case "$1" in
31
+ start)
32
+ log_daemon_msg "Starting $DESC" "$NAME"
33
+ for file in $TMPFILES
34
+ do
35
+ test -e $file && test ! -L $file && rm $file
36
+ done
37
+ if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
38
+ --exec $DAEMON <% if keepalived_syslog_facility %><%= "--log-facility #{keepalived_syslog_facility}" %><% end %> ; then
39
+ log_end_msg 0
40
+ else
41
+ log_end_msg 1
42
+ fi
43
+ ;;
44
+ stop)
45
+ log_daemon_msg "Stopping $DESC" "$NAME"
46
+ if start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
47
+ --exec $DAEMON; then
48
+ log_end_msg 0
49
+ else
50
+ log_end_msg 1
51
+ fi
52
+ ;;
53
+ reload|force-reload)
54
+ log_action_begin_msg "Reloading $DESC configuration..."
55
+ if start-stop-daemon --stop --quiet --signal 1 --pidfile \
56
+ /var/run/$NAME.pid --exec $DAEMON; then
57
+ log_end_msg 0
58
+ else
59
+ log_action_end_msg 1
60
+ fi
61
+ ;;
62
+ restart)
63
+ log_action_begin_msg "Restarting $DESC" "$NAME"
64
+
65
+ start-stop-daemon --stop --quiet --pidfile \
66
+ /var/run/$NAME.pid --exec $DAEMON
67
+ sleep 1
68
+ if start-stop-daemon --start --quiet --pidfile \
69
+ /var/run/$NAME.pid --exec $DAEMON; then
70
+ log_end_msg 0
71
+ else
72
+ log_end_msg 1
73
+ fi
74
+ ;;
75
+ *)
76
+ echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
77
+ exit 1
78
+ ;;
79
+ esac
80
+
81
+ exit 0
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 1
8
8
  - 6
9
- - 42
10
- version: 2.1.6.042
9
+ - 43
10
+ version: 2.1.6.043
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-23 00:00:00 +02:00
18
+ date: 2010-07-26 00:00:00 +02:00
19
19
  default_executable: depify
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -166,6 +166,7 @@ files:
166
166
  - lib/deprec/templates/integrity/config.yml.erb
167
167
  - lib/deprec/templates/iptables/firewall-default.erb
168
168
  - lib/deprec/templates/iptables/firewall-init.erb
169
+ - lib/deprec/templates/keepalived/keepalived-init.erb
169
170
  - lib/deprec/templates/keepalived/keepalived.conf.erb
170
171
  - lib/deprec/templates/logrotate/logrotate.conf.erb
171
172
  - lib/deprec/templates/mongodb/mongodb-init.d