Skip to content
Permalink
Browse files

fix for postgresql database status

  • Loading branch information
serghey-rodin committed Jan 14, 2014
1 parent b30cf73 commit 8a10a6c4f55ec3a96a250d71593d2e3e885eb7f9
Showing with 15 additions and 3 deletions.
  1. +15 −3 bin/v-list-sys-services
@@ -147,10 +147,22 @@ service=$DB_SYSTEM
if [ ! -z "$service" ] && [ "$service" != 'no' ]; then
for db in ${DB_SYSTEM//,/ }; do
service="$db"
if [ "$service" == 'mysql' ] && [ ! -e "/etc/init.d/$service" ]; then
service='mysqld'
if [ "$service" == 'mysql' ]; then
if [ ! -e "/etc/init.d/$service" ]; then
service='mysqld'
fi
if [ ! -e "/etc/redhat-release" ]; then
db_proc_name='mysqld'
fi
fi
get_srv_state $service
if [ "$service" == 'pgsql' ]; then
service='postgresql'
db_proc_name='postmaster'
if [ ! -e "/etc/redhat-release" ]; then
db_proc_name='postgres'
fi
fi
get_srv_state $service $db_proc_name
str="$str\nNAME='$service' SYSTEM='database server' STATE='$state'"
str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'"
done

0 comments on commit 8a10a6c

Please sign in to comment.
You can’t perform that action at this time.