trinidad_init_services 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.1.2 (2012-01-17)
2
+
3
+ * Revert previous fix.
4
+ * Fix #10: use a better procfile name.
5
+
1
6
  == 1.1.1 (2012-01-16)
2
7
 
3
8
  * Fix #8: issue on with -errfile &1 being misinterpreted.
data/init.d/trinidad.erb CHANGED
@@ -5,9 +5,7 @@
5
5
  # Contains common parameters and start/stop
6
6
 
7
7
  # Things you'll need to set on a per script/daemon basis:
8
- # SCRIPT_NAME - Path to the ruby script which creates a Daemon
9
- # object for jsvc to control
10
- # APP_NAME - Name of your application
8
+ # APP_NAME - name of your application (defaults to "trinidad")
11
9
  #
12
10
  # Things you can set:
13
11
  # PROG_OPTS - Arguments to send to the program. A few defaults are appended to this.
@@ -46,16 +44,17 @@ JAVA_PROPS="$JAVA_PROPS -Djruby.memory.max=500m \
46
44
  $JRUBY_OPTS"
47
45
 
48
46
  JAVA_OPTS="-Xmx500m -Xss1024k -Xbootclasspath/a:$JRUBY_HOME/lib/jruby.jar"
47
+ PROC_NAME=${SCRIPT_NAME:-${APP_NAME:-"trinidad"}}
49
48
 
50
49
  JSVC_ARGS="-home $JAVA_HOME \
51
50
  $JSVC_ARGS_EXTRA \
52
51
  -wait 20 \
53
52
  -pidfile $PIDFILE \
54
53
  -user $USER \
55
- -procname jsvc-$SCRIPT_NAME \
54
+ -procname jsvc-$PROC_NAME \
56
55
  -jvm server
57
56
  -outfile $LOG_FILE \
58
- -errfile '&1'"
57
+ -errfile &1"
59
58
 
60
59
  #
61
60
  # Stop/Start
@@ -72,7 +71,7 @@ case "$1" in
72
71
  echo "Pidfile already exists, not starting."
73
72
  exit 1
74
73
  else
75
- echo "Starting $SCRIPT_NAME daemon..."
74
+ echo "Starting $PROC_NAME daemon..."
76
75
  $START_COMMAND
77
76
  EXIT_CODE=$?
78
77
  if [ "$EXIT_CODE" != 0 ]; then
@@ -82,7 +81,7 @@ case "$1" in
82
81
  ;;
83
82
  stop)
84
83
  if [ -e "$PIDFILE" ]; then
85
- echo "Stopping $SCRIPT_NAME daemon..."
84
+ echo "Stopping $PROC_NAME daemon..."
86
85
  $STOP_COMMAND
87
86
  else
88
87
  echo "No pid file, not stopping."
@@ -91,11 +90,11 @@ case "$1" in
91
90
  ;;
92
91
  restart)
93
92
  if [ -e "$PIDFILE" ]; then
94
- echo "Stopping $SCRIPT_NAME daemon..."
93
+ echo "Stopping $PROC_NAME daemon..."
95
94
  $STOP_COMMAND
96
95
  fi
97
96
  if [ -e "$PIDFILE" ]; then
98
- echo "Pidfile still present, $SCRIPT_NAME hasn't stopped"
97
+ echo "Pidfile still present, $PROC_NAME hasn't stopped"
99
98
  exit 1
100
99
  else
101
100
  $START_COMMAND
@@ -3,7 +3,7 @@ require 'trinidad'
3
3
 
4
4
  module Trinidad
5
5
  module Daemon
6
- VERSION = '1.1.1'
6
+ VERSION = '1.1.2'
7
7
 
8
8
  def init
9
9
  end
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'trinidad_init_services'
16
- s.version = '1.1.1'
17
- s.date = '2012-01-16'
16
+ s.version = '1.1.2'
17
+ s.date = '2012-01-17'
18
18
  s.rubyforge_project = 'trinidad_init_services'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trinidad_init_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-16 00:00:00.000000000 Z
12
+ date: 2012-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trinidad
16
- requirement: &2153204080 !ruby/object:Gem::Requirement
16
+ requirement: &2153350240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153204080
24
+ version_requirements: *2153350240
25
25
  description: Trinidad init service scripts on Apache Commons Daemon and JRuby-jsvc,
26
26
  compatible with Unix and Windows services
27
27
  email: calavera@apache.org