Hi, According to rc.subr(8) rc_check should return exit code 0 or 1 but for a running postgresql instance pg_ctl(1) returns 3. In the manpage under status it says: If the server is not running, the process returns an exit status of 3.
Below a patch to fix that - can someone please take care of it? Cheers, Simon Index: pkg/postgresql.rc =================================================================== RCS file: /cvs/ports/databases/postgresql/pkg/postgresql.rc,v retrieving revision 1.11 diff -u -r1.11 postgresql.rc --- pkg/postgresql.rc 23 Sep 2014 08:41:10 -0000 1.11 +++ pkg/postgresql.rc 11 Jan 2015 11:47:31 -0000 @@ -14,6 +14,11 @@ rc_check() { ${rcexec} "${daemon} -D ${datadir} status" + if [ $? -eq 3 ]; then + return 1 + else + return 0 + fi } rc_reload() {