Fix RHEL5 service stopping.
On RHEL5 a service stop returns a 1 instead of 0 if the thing is already stopped, so we now check the status first before attempting to stop.
This commit is contained in:
parent
0be58d7a2c
commit
a8705e2cb2
1 changed files with 1 additions and 0 deletions
|
@ -54,6 +54,7 @@ define postgresql::server::config_entry (
|
|||
# service appropriately.
|
||||
exec { 'postgresql_stop':
|
||||
command => "service ${::postgresql::server::service_name} stop",
|
||||
onlyif => "service ${::postgresql::server::service_name} status",
|
||||
unless => "grep 'PGPORT=${value}' /etc/sysconfig/pgsql/postgresql",
|
||||
path => '/sbin:/bin:/usr/bin:/usr/local/bin',
|
||||
require => File['/etc/sysconfig/pgsql/postgresql'],
|
||||
|
|
Loading…
Reference in a new issue