File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ func Connect() error {
131131 user = parts [3 ]
132132 password = parts [4 ]
133133
134+ if port == "*" {
135+ port = "5432"
136+ }
137+
134138 break
135139 }
136140 }
Original file line number Diff line number Diff line change @@ -93,9 +93,9 @@ func Main(cmd *cobra.Command, args []string) {
9393 version := "4.0.0"
9494 common .ScriptName = "pgsqlHealth"
9595
96- // Check if user is postgres
97- if os .Getenv ("USER" ) != "postgres" {
98- log .Error ().Msg ("This script must be run as the postgres user" )
96+ // Check if user is postgres or iasdb
97+ if os .Getenv ("USER" ) != "postgres" && os . Getenv ( "USER" ) != "iasdb" {
98+ log .Error ().Msg ("This script must be run as the postgres or iasdb user" )
9999 return
100100 }
101101
You can’t perform that action at this time.
0 commit comments