summaryrefslogtreecommitdiffstats
path: root/main/postgresql/postgresql.initd
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-30 16:41:30 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-10-30 16:41:30 +0200
commite1abee9ada08fb805c2919ca01ff9e220ad07186 (patch)
treef7848131c264cdc1007c2c0a0766cfbf171b44ea /main/postgresql/postgresql.initd
parent4817196904e1f54616e525e06c0641cdbd201c98 (diff)
downloadaports-fcolista-e1abee9ada08fb805c2919ca01ff9e220ad07186.tar.bz2
aports-fcolista-e1abee9ada08fb805c2919ca01ff9e220ad07186.tar.xz
main/postgres: fix init.d script pid checking
The pid file contains a lot of numeric stuff. The first line is the PID, so use just 'read' to get it instead of the grep.
Diffstat (limited to 'main/postgresql/postgresql.initd')
-rw-r--r--main/postgresql/postgresql.initd3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd
index 2de91d0df6..3452db8566 100644
--- a/main/postgresql/postgresql.initd
+++ b/main/postgresql/postgresql.initd
@@ -50,7 +50,8 @@ start() {
return 1
fi
- local pid=$(grep "^[0-9]\+" "$PGDATA/postmaster.pid")
+ local pid
+ read pid < "$PGDATA/postmaster.pid"
test -d /proc/"${pid}"
eend $?
}