diff --git a/plugins/postgresql/postgresql_transactions b/plugins/postgresql/postgresql_transactions index c127e633..47db7b64 100755 --- a/plugins/postgresql/postgresql_transactions +++ b/plugins/postgresql/postgresql_transactions @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Plugin to monitor PostgreSQL Commits and Rollbacks in Transactions # @@ -42,4 +42,4 @@ if [ "$1" = "config" ]; then echo 'rollbacks.info Number of transaction rollbacks per second.' exit 0 fi -psql -h ${dbserver} -U ${dbuser} -tc "SELECT 'commits.value '||SUM(xact_commit)::TEXT||E'\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;" --no-align +psql -h "$dbserver" -U "$dbuser" -tc "SELECT 'commits.value '||SUM(xact_commit)::TEXT||E'\\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;" --no-align