Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf78eb4

Browse files
committed
Fix examples of how to use "su" while starting the server.
The syntax "su -c 'command' username" is not accepted by all versions ofsu, for example not OpenBSD's. More portable is "su username -c'command'". So change runtime.sgml to recommend that syntax. Also,add a -D switch to the OpenBSD example script, for consistency with otherexamples. Per Denis Lapshin and Gábor Hidvégi.
1 parent22cdae9 commitcf78eb4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ pg_ctl start -l logfile
280280
<filename>rc.d</> directories. Whatever you do, the server must be
281281
run by the <productname>PostgreSQL</productname> user account
282282
<emphasis>and not by root</emphasis> or any other user. Therefore you
283-
probably should form your commands using <literal>su -c '...'
284-
postgres</literal>. For example:
283+
probably should form your commands using
284+
<literal>supostgres -c '...'</literal>. For example:
285285
<programlisting>
286-
su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
286+
supostgres-c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog'
287287
</programlisting>
288288
</para>
289289

@@ -309,7 +309,7 @@ su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
309309
<indexterm><primary>OpenBSD</><secondary>start script</secondary></>
310310
<programlisting>
311311
if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /usr/local/pgsql/bin/postgres ]; then
312-
su --c '/usr/local/pgsql/bin/pg_ctl start -l /var/postgresql/log -s' postgres
312+
su -l postgres-c '/usr/local/pgsql/bin/pg_ctl start -s -l /var/postgresql/log -D /usr/local/pgsql/data'
313313
echo -n ' postgresql'
314314
fi
315315
</programlisting>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp