diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-20 20:54:01 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-10-20 13:18:29 -0700 |
| commit | b7b525d468b9fa7f63cc6cac243627a48e68e4a6 (patch) | |
| tree | c6cfab84b1065c8e7db7cf19a0619472d7616dd8 | |
| parent | 59d14f122081635c58372381a95ac7af87bc3dc0 (diff) | |
| download | meta-openembedded-b7b525d468b9fa7f63cc6cac243627a48e68e4a6.tar.gz | |
postgresql: update sysv init script
postmaster binary doesn't seem to be installed by default, making the
sysv init script fail to start postgres.
Adjust it to use pg_ctl to start the service, just like its systemd
service counterpart.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-dbs/postgresql/files/postgresql.init | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql.init b/meta-oe/recipes-dbs/postgresql/files/postgresql.init index 1791e68b58..6d20c60a56 100644 --- a/meta-oe/recipes-dbs/postgresql/files/postgresql.init +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql.init | |||
| @@ -56,7 +56,7 @@ pidfile="/var/run/postmaster.${PGPORT}.pid" | |||
| 56 | script_result=0 | 56 | script_result=0 |
| 57 | 57 | ||
| 58 | start(){ | 58 | start(){ |
| 59 | [ -x "$PGENGINE/postmaster" ] || exit 5 | 59 | [ -x "$PGENGINE/pg_ctl" ] || exit 5 |
| 60 | 60 | ||
| 61 | PSQL_START=$"Starting ${NAME} service: " | 61 | PSQL_START=$"Starting ${NAME} service: " |
| 62 | 62 | ||
| @@ -109,9 +109,9 @@ start(){ | |||
| 109 | 109 | ||
| 110 | echo -n "$PSQL_START" | 110 | echo -n "$PSQL_START" |
| 111 | test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_score_adj | 111 | test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_score_adj |
| 112 | $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null | 112 | $SU -l postgres -c "$PGENGINE/pg_ctl start -D '$PGDATA' -s -o '-p $PGPORT' ${PGOPTS} -w -t 300" >> ${PGLOG} |
| 113 | sleep 2 | 113 | |
| 114 | pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null` | 114 | pid=`su postgres -c "pg_ctl status -D /var/lib/postgresql/data" | grep "PID:" | grep -o [0-9]*` |
| 115 | if [ "x$pid" != x ] | 115 | if [ "x$pid" != x ] |
| 116 | then | 116 | then |
| 117 | echo -n " [ OK ]" | 117 | echo -n " [ OK ]" |
