trinidad_daemon 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/README +3 -2
- data/init.d/trinidad.erb +3 -1
- data/lib/trinidad_daemon.rb +2 -1
- data/lib/trinidad_daemon/configuration.rb +14 -10
- data/trinidad_daemon.gemspec +2 -2
- metadata +59 -55
data/History.txt
CHANGED
data/README
CHANGED
@@ -9,7 +9,7 @@ are finding with the current forking process.
|
|
9
9
|
Dependencies
|
10
10
|
============
|
11
11
|
|
12
|
-
The Jsvc binary file is required, but it's already available for all the
|
12
|
+
The Jsvc native binary file is required, but it's already available for all the
|
13
13
|
platforms supported as a bundled package, i.e:
|
14
14
|
|
15
15
|
Debian/Ubuntu:
|
@@ -17,7 +17,8 @@ platforms supported as a bundled package, i.e:
|
|
17
17
|
Mac OS X:
|
18
18
|
$ brew install jsvc
|
19
19
|
|
20
|
-
Those binaries are also available in the Apache distribution directory
|
20
|
+
Those binaries are also available in the Apache distribution directory, if
|
21
|
+
you install it from this directory you must ensure it's in your path:
|
21
22
|
|
22
23
|
http://www.apache.org/dist/commons/daemon/binaries/1.0.3/
|
23
24
|
|
data/init.d/trinidad.erb
CHANGED
@@ -64,6 +64,8 @@ $JSVC_ARGS_EXTRA \
|
|
64
64
|
STOP_COMMAND="$JSVC $JSVC_ARGS -stop $MAIN_CLASS"
|
65
65
|
START_COMMAND="$JSVC $JSVC_ARGS -cp $CLASSPATH $JAVA_PROPS $JAVA_OPTS $MAIN_CLASS $RUBY_SCRIPT $TRINIDAD_OPTS"
|
66
66
|
|
67
|
+
cd $APP_PATH || exit 1
|
68
|
+
|
67
69
|
case "$1" in
|
68
70
|
start)
|
69
71
|
if [ -e "$PIDFILE" ]; then
|
@@ -117,7 +119,7 @@ case "$1" in
|
|
117
119
|
fi
|
118
120
|
;;
|
119
121
|
*)
|
120
|
-
echo "Unrecognised command. Usage trinidad
|
122
|
+
echo "Unrecognised command. Usage trinidad [ start | stop | restart ]"
|
121
123
|
;;
|
122
124
|
esac
|
123
125
|
|
data/lib/trinidad_daemon.rb
CHANGED
@@ -10,14 +10,14 @@ module Trinidad
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def configure
|
13
|
-
@app_path =
|
14
|
-
|
15
|
-
@jsvc =
|
16
|
-
@java_home =
|
17
|
-
@jruby_home =
|
18
|
-
@output_path =
|
19
|
-
@pid_file =
|
20
|
-
@log_file =
|
13
|
+
@app_path = ask_path('Application path?')
|
14
|
+
@trinidad_options = ask('Trinidad options?', '-e production')
|
15
|
+
@jsvc = ask_path('Jsvc path?', `which jsvc`.chomp)
|
16
|
+
@java_home = ask_path('Java home?', default_java_home)
|
17
|
+
@jruby_home = ask_path('JRuby home?', default_jruby_home)
|
18
|
+
@output_path = ask_path('init.d output path?', '/etc/init.d')
|
19
|
+
@pid_file = ask_path('pid file?', '/var/run/trinidad/trinidad.pid')
|
20
|
+
@log_file = ask_path('log file?', '/var/log/trinidad/trinidad.log')
|
21
21
|
|
22
22
|
@trinidad_daemon_path = File.expand_path('../../trinidad_daemon.rb', __FILE__)
|
23
23
|
@jars_path = File.expand_path('../../../trinidad-libs', __FILE__)
|
@@ -33,8 +33,8 @@ module Trinidad
|
|
33
33
|
file.write(daemon)
|
34
34
|
end
|
35
35
|
|
36
|
-
puts "Moving trinidad
|
37
|
-
`cp #{tmp_file} #{@output_path}`
|
36
|
+
puts "Moving trinidad to #{@output_path}"
|
37
|
+
`cp #{tmp_file} #{@output_path} && chmod u+x #{@output_path}`
|
38
38
|
puts 'Done.'
|
39
39
|
end
|
40
40
|
|
@@ -47,6 +47,10 @@ module Trinidad
|
|
47
47
|
Java::JavaLang::System.get_property("java.home")
|
48
48
|
end
|
49
49
|
|
50
|
+
def ask_path(question, default = nil)
|
51
|
+
File.expand_path(ask(question, default))
|
52
|
+
end
|
53
|
+
|
50
54
|
def ask(question, default = nil)
|
51
55
|
return nil if not @stdin.tty?
|
52
56
|
|
data/trinidad_daemon.gemspec
CHANGED
@@ -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_daemon'
|
16
|
-
s.version = '0.3.
|
17
|
-
s.date = '2010-
|
16
|
+
s.version = '0.3.1'
|
17
|
+
s.date = '2010-11-04'
|
18
18
|
s.rubyforge_project = 'trinidad_daemon'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
metadata
CHANGED
@@ -3,89 +3,93 @@ name: trinidad_daemon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.3.
|
6
|
+
- 0
|
7
|
+
- 3
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
|
-
- David Calavera
|
12
|
+
- David Calavera
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-11-04 00:00:00 -07:00
|
18
18
|
default_executable: trinidad_daemon_install
|
19
19
|
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
version_requirements: *id001
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: trinidad
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 9
|
30
|
+
- 6
|
31
|
+
version: 0.9.6
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
35
34
|
description: Trinidad daemon based on Apache Commons Daemon and JRuby-jsvc
|
36
35
|
email: calavera@apache.org
|
37
36
|
executables:
|
38
|
-
- trinidad_daemon_install
|
37
|
+
- trinidad_daemon_install
|
39
38
|
extensions: []
|
40
39
|
|
41
40
|
extra_rdoc_files:
|
42
|
-
- README
|
43
|
-
- LICENSE
|
41
|
+
- README
|
42
|
+
- LICENSE
|
44
43
|
files:
|
45
|
-
- History.txt
|
46
|
-
- LICENSE
|
47
|
-
- README
|
48
|
-
- Rakefile
|
49
|
-
- bin/trinidad_daemon_install
|
50
|
-
- init.d/trinidad.erb
|
51
|
-
- lib/trinidad_daemon.rb
|
52
|
-
- lib/trinidad_daemon/configuration.rb
|
53
|
-
- trinidad-libs/commons-daemon.jar
|
54
|
-
- trinidad-libs/jruby-jsvc.jar
|
55
|
-
- trinidad_daemon.gemspec
|
44
|
+
- History.txt
|
45
|
+
- LICENSE
|
46
|
+
- README
|
47
|
+
- Rakefile
|
48
|
+
- bin/trinidad_daemon_install
|
49
|
+
- init.d/trinidad.erb
|
50
|
+
- lib/trinidad_daemon.rb
|
51
|
+
- lib/trinidad_daemon/configuration.rb
|
52
|
+
- trinidad-libs/commons-daemon.jar
|
53
|
+
- trinidad-libs/jruby-jsvc.jar
|
54
|
+
- trinidad_daemon.gemspec
|
56
55
|
has_rdoc: true
|
57
56
|
homepage: http://github.com/calavera/trinidad_daemon
|
58
57
|
licenses: []
|
59
58
|
|
60
|
-
post_install_message:
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
post_install_message: |+
|
60
|
+
|
61
|
+
------------------------------------------------------------------------------------
|
62
|
+
|
63
|
+
Please now run:
|
64
|
+
|
65
|
+
$ jruby -S trinidad_daemon_install
|
66
|
+
|
67
|
+
to complete the installation.
|
68
|
+
|
69
|
+
------------------------------------------------------------------------------------
|
70
|
+
|
65
71
|
rdoc_options:
|
66
|
-
- --charset=UTF-8
|
72
|
+
- --charset=UTF-8
|
67
73
|
require_paths:
|
68
|
-
- lib
|
74
|
+
- lib
|
69
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
76
|
requirements:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
version: "0"
|
77
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
83
|
requirements:
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
85
89
|
requirements: []
|
86
90
|
|
87
91
|
rubyforge_project: trinidad_daemon
|
88
|
-
rubygems_version: 1.3.
|
92
|
+
rubygems_version: 1.3.6
|
89
93
|
signing_key:
|
90
94
|
specification_version: 2
|
91
95
|
summary: Trinidad daemon based on Apache Commons Daemon
|