diff options
Diffstat (limited to 'pgaas/src/stage/opt/app/pgaas/bin/isrw')
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/isrw | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/isrw b/pgaas/src/stage/opt/app/pgaas/bin/isrw index 4ec3dcb..817030d 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/isrw +++ b/pgaas/src/stage/opt/app/pgaas/bin/isrw @@ -22,7 +22,12 @@ fi export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:$PATH -case `show_pg_is_in_recovery` in - *f* ) echo "Master" ;; - *t* ) echo "Secondary" ;; -esac +if [ -f /var/run/postgresql/inmaintenance ] +then + echo "Maintenance" +else + case `show_pg_is_in_recovery` in + *f* ) echo "Master" ;; + *t* ) echo "Secondary" ;; + esac +fi |