rhoconnect 3.0.0.beta3 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/CHANGELOG +7 -4
  2. data/Gemfile.lock +1 -1
  3. data/Rakefile +40 -44
  4. data/doc/client.txt +16 -0
  5. data/doc/install.txt +2 -2
  6. data/examples/simple/dump.rdb +0 -0
  7. data/install.sh +49 -57
  8. data/installer/unix-like/post_install.sh +4 -0
  9. data/installer/unix-like/post_uninstall.sh +9 -0
  10. data/installer/unix-like/pre_install.sh +9 -0
  11. data/installer/unix-like/pre_uninstall.sh +23 -0
  12. data/installer/unix-like/rho_connect_install_checkers.rb +1 -4
  13. data/installer/unix-like/rho_connect_install_constants.rb +1 -1
  14. data/installer/unix-like/rho_connect_install_debian.rb +2 -2
  15. data/installer/unix-like/rho_connect_install_dnd.rb +7 -9
  16. data/installer/unix-like/rho_connect_install_get_params.rb +0 -2
  17. data/installer/unix-like/rho_connect_install_installers.rb +37 -37
  18. data/installer/unix-like/rho_connect_install_utilities.rb +7 -41
  19. data/installer/unix-like/rhoinstaller.rb +1 -5
  20. data/installer/utils/create_texts.rb +26 -9
  21. data/installer/utils/install_test.rb +24 -12
  22. data/installer/windows/rhosync.nsi +5 -5
  23. data/lib/rhoconnect/console/app/public/home.css +3 -10
  24. data/lib/rhoconnect/console/app/public/images/foot_logo_rhoconnect.png +0 -0
  25. data/lib/rhoconnect/console/app/public/images/logo_rhoconnect.png +0 -0
  26. data/lib/rhoconnect/console/app/routes/docs.rb +1 -1
  27. data/lib/rhoconnect/console/app/routes/home.rb +1 -1
  28. data/lib/rhoconnect/console/app/routes/user.rb +1 -1
  29. data/lib/rhoconnect/console/app/views/index.erb +1 -1
  30. data/lib/rhoconnect/console/app/views/layout.erb +4 -16
  31. data/lib/rhoconnect/db_adapter.rb +5 -7
  32. data/lib/rhoconnect/tasks.rb +31 -4
  33. data/lib/rhoconnect/version.rb +1 -1
  34. data/tasks/redis.rake +2 -2
  35. metadata +10 -21
  36. data/bin/rhoconnect-setup +0 -84
  37. data/installer/deb-scripts/LICENSE +0 -75
  38. data/installer/deb-scripts/install.sh +0 -300
  39. data/installer/deb-scripts/scripts/rho_connect_install_constants.rb +0 -32
  40. data/installer/deb-scripts/scripts/rho_connect_install_installers.rb +0 -103
  41. data/installer/deb-scripts/scripts/rho_connect_install_utilities.rb +0 -110
  42. data/installer/deb-scripts/scripts/rhoinstaller.rb +0 -55
  43. data/installer/deb-scripts/utils/README +0 -67
  44. data/installer/deb-scripts/utils/create_texts.rb +0 -76
  45. data/installer/deb-scripts/utils/redis_init_script +0 -124
  46. data/installer/deb-scripts/utils/redis_log_rotate +0 -8
  47. data/installer/unix-like/install.sh +0 -361
  48. data/installer/unix-like/post-install.sh +0 -8
  49. data/installer/unix-like/pre-install.sh +0 -8
  50. data/lib/rhoconnect/console/app/public/images/rhomobile_rhohub_logo.png +0 -0
data/CHANGELOG CHANGED
@@ -1,5 +1,10 @@
1
- ## 3.0.0.beta3 (not released)
1
+ ## 3.0.0.rc1 (not released)
2
+ * load sqlite3 gem on demand, fixes issue with generator requiring it
3
+ * #18934311 - create :startbg task for Rhostudio
2
4
 
5
+ ## 3.0.0.beta3 (2011-09-23)
6
+ * #18672811 - edge case produces race condition which leads to corruption of Store data
7
+ * #18508155 - on failed syncs allow the user to retry it up to pre-defined number of times
3
8
 
4
9
  ## 3.0.0.beta2 (2011-09-14)
5
10
  * #17830175 - moved SystemTimer in application's Gemfile so rhoconnect gem isn't specific
@@ -18,7 +23,7 @@
18
23
  * #12105115 - removed unnecessary log4r dependency
19
24
  * added bundler to manage gem's dependencies, migrated from rspec1 to rspec2
20
25
  * #5687948 - fixed issue "iPhone push specs failed"
21
- * use redis 2.2.13 by default
26
+ * use redis 2.2.14 by default
22
27
  * added SystemTimer gem dependency (used only on posix systems)
23
28
  * #13616807 - Rake task spec:all fails for enterprise ruby (ree)
24
29
  * #13776713 - Rake -v 0.9.0 breaks rhosync rake tasks
@@ -47,8 +52,6 @@
47
52
  * #18003071 - enhancing console to support multi-user ping
48
53
  * #10313437 - source settings per environment (also applied to dynamic adapters)
49
54
  * #18356697 - store lock is never released (bug fix)
50
- * #18672811 - edge case produces race condition which leads to corruption of Store data
51
- * #18508155 - on failed syncs allow the user to retry it up to pre-defined number of times
52
55
 
53
56
  ## 2.1.10 (2011-08-17)
54
57
  * #16001227 - raise exceptions on c2dm errors
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rhoconnect (3.0.0.beta3)
4
+ rhoconnect (3.0.0.rc1)
5
5
  bundler (~> 1.0)
6
6
  json (~> 1.5.0)
7
7
  rake (= 0.9.2)
data/Rakefile CHANGED
@@ -90,79 +90,75 @@ task :archive do
90
90
  end
91
91
 
92
92
  # Debian and RPM package building tasks
93
-
94
- version = Rhoconnect::VERSION
95
-
96
- def create_post_install(version)
97
- post_install = "#!/bin/sh
98
- VERSION=#{version}
99
-
100
- cd /tmp/installdir/rhoconnect-$VERSION
101
- ./install.sh -v $VERSION
102
-
103
- echo \"Delete tmp files ...\"
104
- rm -rf /tmp/installdir
105
- end #create_Post_install"
106
-
107
- post_install
108
- end #create_post_install
109
-
110
93
  def build_pkg(dist, arch, deps)
111
- curr_dir = `pwd`.strip
112
- workspace = "#{curr_dir}/pkg/workspace"
113
- version = Rhoconnect::VERSION
114
- description = '"Rhoconnect production environment"'
115
- post_install = "#{workspace}/unix-like/post-install.sh"
116
- prefix = "/tmp/installdir/rhoconnect-#{version}"
117
- gem_name = "rhoconnect-#{version}.gem"
118
- post_install = create_post_install version
119
- post_install_script = "#{workspace}/unix-like/post-install.sh"
94
+ curr_dir = `pwd`.strip
95
+ workspace = "#{curr_dir}/pkg/workspace"
96
+ version = Rhoconnect::VERSION
97
+ description = '"Rhoconnect production environment"'
98
+ post_install = "#{workspace}/unix-like/post-install.sh"
99
+ prefix = "/opt/rhoconnect/installer"
100
+ gem_name = "rhoconnect-#{version}.gem"
101
+ pre_install = "#{workspace}/unix-like/pre_install.sh"
102
+ post_install = "#{workspace}/unix-like/post_install.sh"
103
+ pre_uninstall = "#{workspace}/unix-like/pre_uninstall.sh"
104
+ post_uninstall = "#{workspace}/unix-like/post_uninstall.sh"
120
105
 
121
106
  Dir.mkdir("#{workspace}")
122
107
  Dir.mkdir("#{workspace}/unix-like")
123
108
  Dir.mkdir("#{workspace}/utils")
124
109
 
125
- # Turn post_install string into a bash script file and place it in the workspace.
126
- post_install_file = File.new("#{post_install_script}", "w")
127
- post_install_file.write(post_install)
128
- post_install_file.close
129
-
130
110
  # Copy all necessary Files into the workspace
131
- system("cp ./install.sh #{workspace}")
132
- system("cp -r ./installer/unix-like/* #{workspace}/unix-like")
133
- system("cp -r ./installer/utils/* #{workspace}/utils")
134
- system("cp ./pkg/#{gem_name} #{workspace}")
111
+ system("cp install.sh Gemfile Gemfile.lock #{workspace}")
112
+ system("cp -r installer/unix-like/* #{workspace}/unix-like")
113
+ system("cp -r installer/utils/create_texts.rb #{workspace}/utils")
114
+ system("cp pkg/#{gem_name} #{workspace}")
135
115
 
136
116
  # cd into the pkg dir so that fpm will create the package into the pkg dir.
137
117
  Dir.chdir("./pkg")
138
118
 
139
119
  # Construct fpm command
140
- fpm_cmd = "fpm -s dir -t #{dist} -n rhoconnect -v #{version} -a #{arch} " +
141
- "-C #{workspace} --post-install #{post_install_script} --prefix #{prefix} " +
142
- "--description #{description}"
120
+ fpm_cmd = "fpm -s dir -t #{dist} -n rhoconnect -v #{version} -a #{arch} -C #{workspace} " +
121
+ "--pre-install #{pre_install} --post-install #{post_install} " +
122
+ "--pre-uninstall #{pre_uninstall} --post-uninstall #{post_uninstall} " +
123
+ "--prefix #{prefix} --description #{description}"
143
124
 
144
125
  # Add the list of dependencies to the fpm call
145
126
  deps.each do |dep|
146
- fpm_cmd << " -d #{dep}"
127
+ fpm_cmd << " -d '#{dep}'"
147
128
  end #do
148
129
 
149
130
  # Create the package
131
+ puts fpm_cmd
150
132
  system(fpm_cmd)
151
-
152
133
  # Leave no trace...
153
134
  system("rm -rf #{workspace}")
154
135
  end #build_pkg
155
136
 
137
+ desc "Build Debian DEB rhoconnect-#{Rhoconnect::VERSION}_all.deb package into the pkg directory"
156
138
  task "build:deb" => :build do
157
- deps = ['build-essential', 'zlib1g-dev','libssl-dev', 'libreadline5-dev',
158
- 'libcurl4-openssl-dev', 'libsqlite3-0']
139
+ deps = [
140
+ "build-essential (>= 0)",
141
+ "zlib1g-dev (>= 0)",
142
+ "libssl-dev (>= 0)",
143
+ "libcurl4-openssl-dev (>= 0)",
144
+ "libreadline5-dev (>= 0)",
145
+ "libsqlite3-0 (>= 3.7.4)",
146
+ "libsqlite3-dev (>= 3.7.4)"
147
+ ]
159
148
 
160
149
  build_pkg "deb", "all", deps
161
150
  end #build:deb
162
151
 
152
+ desc "Build Red Hat RPM rhoconnect-#{Rhoconnect::VERSION}.noarch.rpm package into the pkg directory"
163
153
  task "build:rpm" => :build do
164
- deps = ['gcc-c++', 'zlib-devel', 'openssl-devel', 'readline-devel', 'curl-devel',
165
- 'pcre-devel']
154
+ deps = [
155
+ "gcc-c++ >= 4.1.2",
156
+ "zlib-devel >= 1.2.3",
157
+ "curl-devel >= 7.15.5",
158
+ "pcre-devel >= 6.6",
159
+ "openssl-devel >= 0.9.8e",
160
+ "readline-devel >= 5.1"
161
+ ]
166
162
 
167
163
  build_pkg "rpm", "noarch", deps
168
164
  end #build:rpm
data/doc/client.txt CHANGED
@@ -14,6 +14,22 @@ Rhoconnect Client is a library to add sync data capability to your applications.
14
14
 
15
15
  * Add these libraries to your project: `libstdc++6.dylib, libsqlite3.dylib, libz.dylib, CFNetwork.framework`.
16
16
 
17
+ ### Features supported
18
+
19
+ <table>
20
+ <tr><th>Feature</th><th>&nbsp;Ruby&nbsp;</th><th>ObjectiveC</th></tr>
21
+ <tr><td>Property bag model</td><td>yes</td><td>yes</td></tr>
22
+ <tr><td>Fixed schema mode</td><td>yes</td><td>yes</td></tr>
23
+ <tr><td>Model associations</td><td>yes</td><td>yes</td></tr>
24
+ <tr><td>BLOB attributes</td><td>yes</td><td>yes</td></tr>
25
+ <tr><td>Bulk sync</td><td>yes</td><td>yes</td></tr>
26
+ <tr><td>Sync</td><td>yes</td><td>yes</td></tr>
27
+ <tr><td>Notifications</td><td>yes</td><td>yes</td></tr>
28
+ <tr><td>Database reset</td><td>yes</td><td>yes</td></tr>
29
+ <tr><td>Authentication</td><td>yes</td><td>yes</td></tr>
30
+ <tr><td>DB partitioning</td><td>yes</td><td>not yet</td></tr>
31
+ </table>
32
+
17
33
  ### Object Model
18
34
 
19
35
  #### RhoConnectClient
data/doc/install.txt CHANGED
@@ -13,11 +13,11 @@ Your RhoConnect application folder will be located in C:\RhoConnect\rhoconnect b
13
13
 
14
14
  1. [Ruby v1.8.7+](http://www.ruby-lang.org/en/downloads/)
15
15
 
16
- 2. [RubyGems v1.3.7+](http://rubygems.org/pages/download)
16
+ 2. [RubyGems v1.8.5+](http://rubygems.org/pages/download)
17
17
 
18
18
  3. Ruby Web Server - We test with [thin](http://code.macournoyer.com/thin/), and [passenger](http://www.modrails.com/). WEBrick, the web server that ships with ruby, is known to cause issues with HTTP headers/cookies and is ***not*** recommended.
19
19
 
20
- 4. [Redis 2.2.x](http://redis.io/) - RhoConnect includes a simple [rake task](/rhoconnect/command-line#rake-tasks) `redis:install` to install redis, covered in the next section. Alternatively, you can [install redis directly](http://redis.io/download).
20
+ 4. [Redis 2.2.14+](http://redis.io/) - RhoConnect includes a simple [rake task](/rhoconnect/command-line#rake-tasks) `redis:install` to install redis, covered in the next section. Alternatively, you can [install redis directly](http://redis.io/download).
21
21
 
22
22
  ### Installing RhoConnect Gem
23
23
 
Binary file
data/install.sh CHANGED
@@ -13,35 +13,29 @@ installTime=$timeInitial
13
13
 
14
14
  # CONSTANTS
15
15
 
16
- RHOCONNECT_VERSION="3.0.0.beta3"
17
16
  DEPS=(gcc tar make wget)
18
17
 
19
18
  # FUNCTIONS
20
-
21
- echoLog ()
22
- {
23
- timeStamp="[`date`]: "
24
- echo -e $1
25
- #end echoLog
26
- }
27
-
19
+ # showHelp
20
+ # Prints options to the screen
28
21
  showHelp ()
29
22
  {
30
- echoLog "
31
- Usage: install.sh [options]\n
32
- --no-redis Skip the installation of the redis server.\n
33
- --offline Check that all necessary files are installed in /opt/rhoconnect if no prefix is specified.\n
34
- -p, --prefix PREFIX Specify PREFIX as the installation directory. Default is /opt/rhoconnect.\n
35
- -r, --ruby-version VERSION Specify version of ruby to install. Default is Ruby Enterprise.\n
36
- -s, --silent Perform installation with minimal output.\n
37
- --skip-ruby Use system ruby instead of ruby installed through this installer.\n
38
- -w, --web-server SERVER Specify that you are using web server SERVER. Default is Nginx.\n
39
- -h, --help Display this screen.\n
40
- "
41
- # End script after printing help message
42
- exit
43
- } #end showHelp
23
+ cat << _USAGE_
24
+ Usage: install.sh [options]
25
+ --no-redis Skip the installation of the redis server.
26
+ --offline Check that all necessary files are installed in /opt/rhoconnect if no prefix is specified.
27
+ -p, --prefix PREFIX Specify PREFIX as the installation directory. Default is /opt/rhoconnect.
28
+ -r, --ruby-version VERSION Specify version of ruby to install. Default is Ruby Enterprise.
29
+ -s, --silent Perform installation with minimal output.
30
+ --skip-ruby Use system ruby instead of ruby installed through this installer.
31
+ -w, --web-server SERVER Specify that you are using web server SERVER. Default is Nginx.
32
+ -h, --help Display this screen.
33
+ _USAGE_
34
+ exit
35
+ }
44
36
 
37
+ # checkDeps
38
+ # Checks that all common dependencies are present, exits if not
45
39
  checkDeps ()
46
40
  {
47
41
  missingDeps=""
@@ -54,13 +48,16 @@ checkDeps ()
54
48
  done
55
49
 
56
50
  if [[ $missingDeps != "" ]]; then
57
- echoLog "Dependencies Missing: " | tee -a $log
58
- echoLog "${missingDeps}" | tee -a $log
59
- echoLog "These must be installed before setup can continue..." | tee -a $log
51
+ echo "Dependencies Missing: " | tee -a $log
52
+ echo "${missingDeps}" | tee -a $log
53
+ echo "These must be installed before setup can continue..." | tee -a $log
60
54
  exit
61
55
  fi
62
56
  } #end checkDeps
63
57
 
58
+ # determinePkgMgr
59
+ # Determines if the system is currently using rpm or
60
+ # debian based pckage management
64
61
  determinePkgMgr ()
65
62
  {
66
63
  if [[ `which apt-get 2> /dev/null` != "" ]]; then
@@ -70,12 +67,14 @@ determinePkgMgr ()
70
67
  pkgMgr="yum -y"
71
68
  dist='yum'
72
69
  else
73
- echoLog "No supported package manager." | tee -a $log
74
- echoLog "Please install apt-get or yum to continue..." | tee -a $log
70
+ echo "No supported package manager." | tee -a $log
71
+ echo "Please install apt-get or yum to continue..." | tee -a $log
75
72
  exit
76
73
  fi
77
74
  } #end determinePkgMgr
78
75
 
76
+ # parseOpts
77
+ # Parses options passed to the install script
79
78
  parseOpts ()
80
79
  {
81
80
  for i in "$*"; do
@@ -92,9 +91,6 @@ parseOpts ()
92
91
  "r" )
93
92
  rubyVersion=$i
94
93
  ;;
95
- "v" )
96
- rhoconnectVersion=$i
97
- ;;
98
94
  * )
99
95
  ;;
100
96
  esac
@@ -120,15 +116,12 @@ parseOpts ()
120
116
  --skip-ruby )
121
117
  ruby=false
122
118
  ;;
123
- -v )
124
- getVal="v"
125
- ;;
126
119
  --help | -h )
127
120
  showHelp
128
121
  ;;
129
122
  * )
130
123
  #if [ "${i}" ]; then
131
- # echoLog "${i} is not a valid option" | tee -a $log
124
+ # echo "${i} is not a valid option" | tee -a $log
132
125
  # exit
133
126
  #fi
134
127
  ;;
@@ -166,11 +159,11 @@ setPrefixDependantPaths ()
166
159
 
167
160
  # Make path to log file absolute and create directory if not already existent
168
161
  log="${prefix}/logs/${log}"
169
- touch $log
162
+ touch $log > /dev/null
170
163
 
171
164
  # Add the log file path to the info file
172
165
  `echo $log >> info.dat`
173
- cat info.dat
166
+ #cat info.dat
174
167
 
175
168
  # Move info.dat into installation directory if not already there
176
169
  if ! [ -e "${prefix}/info.dat" ]; then
@@ -193,9 +186,8 @@ setDefaults ()
193
186
 
194
187
  logAndPrint ()
195
188
  {
196
- $1 > tempout 2>&1
189
+ $1 > $log 2>&1
197
190
  exitStatus=$?
198
- cat tempout | tee -a $log
199
191
  } #end logAndPrint
200
192
 
201
193
  setRubyVars ()
@@ -214,7 +206,7 @@ setRubyVars ()
214
206
  rubyTar="${rubyDir}.tar.gz"
215
207
  rubyURL="http://ftp.ruby-lang.org/pub/ruby/1.9/${rubyTar}"
216
208
  else
217
- echoLog "${rubyVersion} is not a valid ruby version" | tee -a $log
209
+ echo "${rubyVersion} is not a valid ruby version" | tee -a $log
218
210
  exit
219
211
  fi
220
212
  } #end setRubyVars
@@ -222,13 +214,13 @@ setRubyVars ()
222
214
  installRuby ()
223
215
  {
224
216
  if [[ ! -d "${prefix}${rubyDir}" ]]; then
225
- echoLog "Loading ruby tarball ..." | tee -a $log
226
- echoLog "wget -P ${prefix} ${rubyURL}" | tee -a $log
227
- wget -P ${prefix} ${rubyURL}
228
- echoLog "tar -xzf ${prefix}/${rubyTar} -C ${prefix}" | tee -a $log
229
- tar -xzf ${prefix}/${rubyTar} -C ${prefix}
217
+ echo "Downloading ${rubyURL} ..." | tee -a $log
218
+ echo "wget -P ${prefix} ${rubyURL}" >> $log
219
+ wget -P ${prefix} ${rubyURL} > $log 2>&1
220
+ echo "tar -xzf ${prefix}/${rubyTar} -C ${prefix}" >> $log
221
+ tar -xzf ${prefix}/${rubyTar} -C ${prefix} > $log 2>&1
230
222
  fi
231
- echoLog "Installing ruby. This may take some time..." | tee -a $log
223
+ echo "Installing ruby. This may take some time..." | tee -a $log
232
224
 
233
225
  case $rubyVersion in
234
226
  rubyee)
@@ -243,18 +235,19 @@ installRuby ()
243
235
  logAndPrint "make && make install"
244
236
  ;;
245
237
  *)
246
- logAndPrint "echoLog \"${rubyVersion} is not a supported ruby version\""
238
+ logAndPrint "echo \"${rubyVersion} is not a supported ruby version\""
247
239
  exit
248
240
  ;;
249
241
  esac
250
242
 
251
243
  if [[ $exitStatus != 0 ]]; then
252
- echoLog "Some dependencies not installed..." | tee -a $log
253
- echoLog "Please install them and then re-run the installation script." | tee -a $log
244
+ echo "Some dependencies not installed..." | tee -a $log
245
+ echo "Please install them and then re-run the installation script." | tee -a $log
246
+ echo "For troubleshooting see file $log ..." | tee -a $log
254
247
  exit
255
248
  fi
256
-
257
- rm tempout
249
+
250
+ echo "Ruby $rubyDir is successfully installed." | tee -a $log
258
251
  } #end installRuby
259
252
 
260
253
  getTime ()
@@ -289,16 +282,15 @@ getTime ()
289
282
  fi
290
283
  fi
291
284
 
292
- echoLog "\nInstallation completed in ${timeHour}${timeMin}${timeSec}."
285
+ echo "\nInstallation completed in ${timeHour}${timeMin}${timeSec}."
293
286
  } #end getTime
294
287
 
295
288
  # SCRIPT
296
289
 
297
290
  # Get starting directory
298
291
  startDir=`pwd`
299
-
300
- if [[ $startDir =~ "rhoconnect-${RHOCONNECT_VERSION}" ]]; then
301
- INSTALL_DIR="/tmp/installdir/rhoconnect-${RHOCONNECT_VERSION}"
292
+ if [[ $startDir = "/opt/rhoconnect/installer" ]]; then #FIXME:
293
+ INSTALL_DIR="/opt/rhoconnect/installer"
302
294
  else
303
295
  INSTALL_DIR="./installer"
304
296
  fi
@@ -329,7 +321,7 @@ setDefaults
329
321
 
330
322
  # Reformat ruby version to fit this scripts format
331
323
  # Tolower rubyVersion
332
- rubyVersion=$(echoLog $rubyVersion | tr '[:upper:]' '[:lower:]')
324
+ rubyVersion=$(echo $rubyVersion | tr '[:upper:]' '[:lower:]')
333
325
  # Remove all white space
334
326
  rubyVersion=${rubyVersion//[[:space:]]}
335
327
  # Remove periods and hyphens such as those present in version numbers
@@ -348,7 +340,7 @@ setPrefixDependantPaths
348
340
  if ! [ -e "${prefix}/bin/ruby" ]; then
349
341
  installRuby
350
342
  else
351
- echoLog "Ruby already installed" | tee -a $log
343
+ echo "Ruby already installed" | tee -a $log
352
344
  fi
353
345
 
354
346
  # Construct the string with which to call the ruby installation script.
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ cd /opt/rhoconnect/installer
4
+ ./install.sh
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ if [ -d "/opt/rhoconnect" ]; then
4
+ rm -rf /opt/rhoconnect
5
+ fi
6
+
7
+ if [ -d "/opt/nginx" ]; then
8
+ rm -rf /opt/nginx
9
+ fi
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ if [ -d "/opt/rhoconnect" ]; then
4
+ rm -rf /opt.rhoconnect
5
+ fi
6
+
7
+ #if [ -d "/opt/nginx" ]; then
8
+ # rm -rf /opt/nginx
9
+ #fi
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ # Stop redis
4
+ if [ -e "/etc/init.d/redis" ]; then
5
+ /etc/init.d/redis stop
6
+ if [[ `which dpkg 2> /dev/null` != "" ]]; then # Debian
7
+ update-rc.d -f redis remove
8
+ elif [[ `which rpm 2> /dev/null` != "" ]]; then # Red Hat
9
+ /sbin/chkconfig redis off
10
+ fi
11
+ fi
12
+
13
+ #stop nginx
14
+ if [ -e "/etc/init.d/nginx" ]; then
15
+ /etc/init.d/nginx stop
16
+ fi
17
+
18
+ # /etc/logrotate.d/redis
19
+ rm -f /etc/init.d/redis
20
+ rm -f /etc/logrotate.d/redis
21
+
22
+ rm -f /etc/init.d/nginx
23
+ rm -f /etc/logrotate.d/nginx
@@ -1,9 +1,7 @@
1
1
  require 'rho_connect_install_constants'
2
2
 
3
3
  module Checkers
4
- extend self
5
-
6
- # check_all_installed
4
+ # check_all_installed
7
5
  # This method runs all tests that check whether or not the software is
8
6
  # installed correctly.
9
7
  def check_all_installed(options)
@@ -80,7 +78,6 @@ module Checkers
80
78
  # This method uses a system call to chack that a gem is installed
81
79
  def check_gem(gem, gem_path)
82
80
  result = `#{gem_path} query --local | grep #{ gem }`
83
- puts "Result:" + result
84
81
  if result == ""
85
82
  installed = false
86
83
  else
@@ -9,7 +9,7 @@ PACKAGES = ["zlib1g-dev",
9
9
  "dtach"]
10
10
 
11
11
  #RUBYGEMS = "rubygems-1.8.5"
12
- REDIS = "redis-2.2.13"
12
+ REDIS = "redis-2.2.14"
13
13
  SQLITE3 = "sqlite-autoconf-3070701"
14
14
  RUBY = "ruby-enterprise-1.8.7-2011.03"
15
15
  Nginx = "nginx-1.0.6"
@@ -33,8 +33,8 @@ class Debian
33
33
  install_redis if @options[:redis]
34
34
 
35
35
  # Look for sqlite3-dev as it is required by the sqlite3 gem
36
- `apt-get -y install libsqlite3-dev` if `dpkg -l | grep libsqlite3-dev`.empty?
37
-
36
+ `#{@options[:pkg_mgr]} install libsqlite3-dev` if `#{@options[:pkg_chkr]} | grep libsqlite3-dev`.empty?
37
+
38
38
  #start installing
39
39
  install_all_gems
40
40
  configure_passenger @options
@@ -1,24 +1,23 @@
1
1
  require 'rho_connect_install_constants'
2
2
 
3
3
  module DownloadAndDocompress
4
- extend self
5
-
6
4
  # download_and_decompress
7
5
  # Delegates the download and decompression duties
8
6
  def download_and_decompress(prefix, tarballs)
9
- print_header "Downloading and Decompressing"
7
+ #print_header "Downloading ..."
10
8
  downloads = 0
11
9
  tarballs.each do |url|
12
10
  if !File.exists?("#{ get_tarball_name url }") ||
13
11
  !File.exists?("#{ get_version url }")
12
+ puts "Downloading #{url} ..."
14
13
  wget_download prefix, url
15
14
  decompress prefix, url
16
15
  downloads += 1
17
16
  end #if
18
17
  end #do
19
- if downloads == 0
20
- log_print "Nothing additional to download"
21
- end #if
18
+ # if downloads == 0
19
+ # log_print "Nothing additional to download"
20
+ # end #if
22
21
  end #download_and_decompress
23
22
 
24
23
  # wget_download
@@ -27,7 +26,7 @@ module DownloadAndDocompress
27
26
  def wget_download(prefix, url)
28
27
  if !File.exists?("#{ prefix }/#{ get_tarball_name url }") &&
29
28
  !File.directory?("#{ prefix }/#{ get_version url }")
30
- cmd "wget -P #{ prefix } #{ url }"
29
+ cmd "wget -P #{ prefix } #{ url } "
31
30
  end #if
32
31
  end #wget_download
33
32
 
@@ -37,8 +36,7 @@ module DownloadAndDocompress
37
36
  def decompress(prefix, url)
38
37
  tarball = get_tarball_name(url)
39
38
  dir = get_version(url)
40
- cmd "tar -xzf #{ prefix }/#{ tarball } -C #{ prefix }" unless
41
- File.directory? "#{ prefix }/#{ dir }"
39
+ cmd "tar -xzf #{ prefix }/#{ tarball } -C #{ prefix }" unless File.directory? "#{ prefix }/#{ dir }"
42
40
  end #decompress
43
41
 
44
42
  # get_version
@@ -3,8 +3,6 @@ require 'rho_connect_install_debian'
3
3
  require 'rho_connect_install_yum'
4
4
 
5
5
  module GetParams
6
- extend self
7
-
8
6
  # get_flavor
9
7
  # determine whether running on a debian system or a yum system
10
8
  def get_flavor(options)