psadmin_plus 0.1.0 → 2.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/psadmin_plus.rb +15 -7
  3. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 47ce42a7db4acd97417692af8913cfc3319f77cb
4
- data.tar.gz: 5f773efd97773eb911b6ba56aa623eda105f71eb
2
+ SHA256:
3
+ metadata.gz: 1b131e3db46750b3e5bca783ef3ea2c0f99c2abaa7d809c0dbd667f67e77252f
4
+ data.tar.gz: f9cd54cf1507085abd557c3229d538e4325a6c0f0938a7be2d8cf364f448bd70
5
5
  SHA512:
6
- metadata.gz: '08aad82614e197ebd1f0ce216175d1bacc71023c3e49ae2d4d3643d9640ad958c880ea86b7891efcec8ab6db7bb6c61eef790d4e8d2d5af3ba4645ef3a6ab71d'
7
- data.tar.gz: 37ce1d7b1e8295b9fbb450f142339e8a266318dc59625bcfc22ca014d5b777e230cbdcf91e4a8dfd68ea79d77ec61c627778202ad61eb654da14e544f826a4c2
6
+ metadata.gz: 4d48fdae790a0f0245a8d19addad355f897a27650d537a0b1f879fa6bc3d1fa905a6cd820dfdc0626f567b379570b875039e9b85d651c1d54efa5934e4b80e95
7
+ data.tar.gz: e45d8e1be2e0fdc5410245c0087769befe6651735cfaadc64f26f1f86374f5338496e349f609ea9c69b2bc0e1aad70275b531ce976727f64221508653fbedbb5
@@ -97,6 +97,7 @@ def do_cmd(cmd, print = true, powershell = true)
97
97
  out = "Invalid OS"
98
98
  end
99
99
  print ? (puts out) : result = out
100
+ out
100
101
  end
101
102
 
102
103
  def do_cmd_banner(c,t,d)
@@ -267,13 +268,15 @@ def do_start(type, domain)
267
268
  start_app_service_cmd = "start-service #{app_service_name}"
268
269
  start_prcs_cmd = "#{PS_PSADMIN_PATH}/psadmin -p start -d #{domain}"
269
270
  start_prcs_service_cmd = "start-service #{prcs_service_name}"
270
- start_web_cmd = "#{PS_PSADMIN_PATH}/psadmin -w start -d #{domain}"
271
+ start_web_cmd_lnx = "${PS_CFG_HOME?}/webserv/#{domain}/bin/startPIA.sh"
272
+ start_web_cmd_win = "#{PS_PSADMIN_PATH}/psadmin -w start -d #{domain}"
271
273
  start_web_service_cmd = "start-service #{web_service_name}"
272
274
 
275
+ # 10-08-2020 Dale Haman: Changing the logic used on PS_WIN_SERVICES, it will never be tux, app or all.
273
276
  case type
274
277
  when "app"
275
278
  case "#{PS_WIN_SERVICES}"
276
- when "tux", "app", "all"
279
+ when "true", "tux", "app", "all"
277
280
  do_cmd(start_app_service_cmd)
278
281
  else
279
282
  do_cmd(start_app_cmd)
@@ -284,7 +287,7 @@ def do_start(type, domain)
284
287
  end
285
288
  when "prcs"
286
289
  case "#{PS_WIN_SERVICES}"
287
- when "tux", "prcs", "all"
290
+ when "true", "tux", "prcs", "all"
288
291
  do_cmd(start_prcs_service_cmd)
289
292
  else
290
293
  do_cmd(start_prcs_cmd)
@@ -296,16 +299,21 @@ def do_start(type, domain)
296
299
  when "web"
297
300
  case "#{OS_CONST}"
298
301
  when "linux"
299
- do_cmd(start_web_cmd)
302
+ if File.exist?("#{ENV['PS_CFG_HOME']}/webserv/#{domain}/servers/PIA/tmp/PIA.lok")
303
+ puts "Domain #{domain} already started"
304
+ else
305
+ do_cmd(start_web_cmd_lnx)
306
+ sleep 5.0
307
+ end
300
308
  when "windows"
301
309
  case "#{PS_WIN_SERVICES}"
302
- when "web", "all"
310
+ when "true", "web", "all"
303
311
  do_cmd(start_web_service_cmd)
304
312
  else
305
313
  # Run command outside of powershell with 'false' parameter
306
- do_cmd(start_web_cmd, true, false)
314
+ do_cmd(start_web_cmd_win, true, false)
307
315
  case "#{PS_TRAIL_SERVICE}"
308
- when "true"
316
+ when "true", "web", "all"
309
317
  do_cmd(start_web_service_cmd)
310
318
  end
311
319
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psadmin_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Benson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-29 00:00:00.000000000 Z
12
+ date: 2020-10-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A psadmin helper tool
15
15
  email: kyle@psadmin.io
@@ -39,8 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubyforge_project:
43
- rubygems_version: 2.6.12
42
+ rubygems_version: 3.1.4
44
43
  signing_key:
45
44
  specification_version: 4
46
45
  summary: psadmin plus