File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 142142 $bindir = pick($bindir , " /usr/lib/postgresql/${version} /bin" )
143143 $datadir = pick($datadir , " /var/lib/postgresql/${version} /main" )
144144 $confdir = pick($confdir , " /etc/postgresql/${version} /main" )
145- $service_status = pick($service_status , " /etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'" )
145+ if versioncmp($::operatingsystemrelease , ' 8.0' ) >= 0 {
146+ # Jessie uses systemd
147+ $service_status = pick($service_status , " /usr/sbin/service ${service_name} @*-main status" )
148+ } else {
149+ $service_status = pick($service_status , " /etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'" )
150+ }
146151 $service_reload = " service ${service_name} reload"
147152 $psql_path = pick($psql_path , ' /usr/bin/psql' )
148153 }
You can’t perform that action at this time.
0 commit comments